Overall, I recommend it.
Perfect example: Clojure. Clojure is the textbook esoteric programmers dream... but it's SUPER easy to sell and integrate in a typical Java shop. Why? Clojure is Java. You can use everything on Maven. You can interop with any Java tooling. No hacks or BS required... it's a native compatibility. The fact that the Gleam did not opt for this level of congruence is mind boggling to me.
I could be wrong btw so please correct me if I am. I am genuinely interested in using Gleam in place of Elixir (I think they nailed syntax and got rid of a lot of bullshit) but it is unfortunately not a drop-in replacement. It should be.
Using Gleam in an Elixir project did/does rely on mix_gleam. I've used it some years ago and it worked then, but I haven't had recent experiences. There is a pull request[0] to Elixir to add built-in support for Gleam and as I understand it the Gleam team have made several changes to Gleam tooling to facilitate it, but it's unmerged as of now.
Using Elixir in a Gleam project is just an external function away, just like using Erlang or JavaScript (when using the JS target). E.g.
@external(erlang, "Elixir.Some.Module", "my_fun")
fn my_fun(some_arg: Wibble) -> Wobble
You can also write .ex files in your codebase and use functions from them as externals and they'll be compiled by Gleam.The two main issues on that side are macros and structs. Since Gleam doesn't know about Elixir source or Elixir macros, you can't use them directly. But you can have an .ex file that uses macros and then you can call functions from that file. Structs are trickier, because they're just dynamic maps with a special key-value pair, and maps in Gleam (called Dict) have fixed types for the keys and values. That means you can't model a struct as a Dict. Gleam uses records for its own custom types, so what you can do is either use records on the Elixir side (with the Record module or by hand), or map the Elixir side data structures to be more palatable for Gleam (and vice versa) in your external functions --- which is what you generally do with externals anyway. Of course, if you only intend to pass the Elixir structs around and then back to Elixir, you can model them as external types that are then opaque to Gleam.
https://gleam.run/frequently-asked-questions/#Can-I-use-Elix...
The copious training data on mainstream languages doesn't really translate as a network effect, and therefore is kind of a red herring because the AI can use all that training on new languages as well. e.g. if you use a esoteric language that is vaguely object oriented, the AI will use its vast training on object oriented programs and apply it to your language instead of falling over because your language isn't Python and it doesn't have training data on it.
Moreover, the AI is trained on copious amounts of PL research, so it's not like the ideas in a new language are completely new to it.
A much more recent and imo more realistic comparison of different languages with ai, is openai's study reimplementing sqlite in different languages: https://openai.com/index/low-resource-programming-languages/
That showed about what we expect, that popular languages like python, javascript, java, C#, etc do best, while less popular languages like Common Lisp, Ocaml, Zig, etc do slightly worse. But the difference is small enough I'd still just choose whatever language and ecosystem I know best that is appropriate for a project.
https://carolina.codes/speakers/2024/dillon-mulroy
That site is also partially powered by Gleam on the backend.
Missing currying feels a little to me like walking in FP land with one leg cut off.
IMO it is hard to read (unless you're very familiar with the functions at hand), produces type errors that are not easy to follow (oops, I forgot the last arg), and is too rigid (I often need to partially apply arguments in non left-to-right order).
I never understood why partial application via "slots" isn't more common though (I just made up the term, not sure if this has a name). Like Clojure's:
#(f %2 "foo" %1 "bar")
;; same as
(fn [a b] (f b "foo" a "bar"))
Does Gleam have something like that?See the relevant docs: https://tour.gleam.run/everything/#functions-function-captur...
Seems more limiting than the closure way. Scala allows multiple _ but in turn that doesn't allow changing ordering.
TBH, I feel this stuff is not really worth it,
Plenty of practical reasons for currying, but the biggest (imo) is for use with the pipe operator.
If they don't have partial application now, what are the odds they'll have it in the future?
F# showed a lot of promise with Fable, but the community never quite got the tooling right, I think for a lack of energy/funding.
There are a few rough patches too. For example, I have yet to find out how to run a single test and not the whole suite.
And a third group couldn't care less either way.
I have a few decades on my back, I am a father, a husband, a nerd... I once was young too, believe it or not, and I had ideals and I fought for them.
If you don't participate in this, why does it bother you? Unless they are active around your doorstep, that is.
That could be repaired, just don't care enough to spend time there again I guess.
Suggestions about cool projects are just as important as warnings about uncool projects.
Same as art by Hitler... if I would like it, I would like it, doesn't matter that I think he was one of the worst human beings.
So: I just argued, that there is a third way to view it.
You may, of course, see it completely differently and deem this project "uncool" for whatever reasons you want!
I have no problem with a community setting whatever acceptance criteria they like.
If the license did the same, I could see a case of being a bit of overzealousness.
I couldn't find if that was the issue, but if your problem is that the creator and the community have political opinions and don't like people with incompatible ones, then that's just society...
That’s probably what the OP meant by “activism”.
Do you only use languages that you can contribute to their codebase?
It might be problematic to use a language where needed help could be preceded by Twitter or HN background and allegiance check.
That is exceedingly rare. The vast majority of times you will either find your answer online to work your way around issues.
> It might be problematic to use a language where needed help could be preceded by Twitter or HN background and allegiance check.
I would remind you that we have LLMs now. One of the greatest gifts of LLMs is not having to rely on talking to people online to figure out issues when using a language/framework/library.