r/functionalprogramming • u/Asleep-Dress-3578 • Mar 14 '24
Question What is your review about the Gleam programming language?
https://gleam.runDo you plan to use it?
54
Upvotes
r/functionalprogramming • u/Asleep-Dress-3578 • Mar 14 '24
Do you plan to use it?
37
u/lpil Mar 14 '24
It's great!
12
u/TankorSmash Mar 14 '24
I was checking it out to make a SpaceTraders game wrapper but then got distracted by trying to re-implement something like https://www.youtube.com/watch?v=JvBT4XBdoUE with the fault-tolerance stuff.
I'm enjoying it! Having a good typesystem goes a long way, and in my small project so far compile times are quick so I don't feel like I'm waiting for the compiler. Looking forward to hot reloading.
There are some teething issues; the error tracebacks are fairly limited, since it doesn't appear to actually show your gleam lines but the transpiled erlang lines, and the docs are still a WIP for a bunch of stuff. It's got a nice WIP LSP going, and comes with a nice formatter. You need to have an erlang runtime installed, which was tricky to figure out.
9
u/imihnevich Mar 14 '24
I liked
usesugar. Rest of it is mostly very very simple, straightforward, and familiar, butusegot me interested.7
u/lIIllIIlllIIllIIl Mar 14 '24 edited Mar 14 '24
It looks really nice! I've been meaning to learn Elixir for a while, but couldn't get the being the lack of static typing. Gleam really solved that problem for me!
However, as an Elixir / Erlang noob, I'm having a hard time understanding Erlang/OTP, BEAM, and how Gleam plays into all that. I get that Erlang is massively scaleable, but in practice, how does Gleam achieve that? I haven't found an explainer page on Gleam's documentation, and I feel like the absense of it undersells what Gleam is capable of doing, especially compared to Go, which also handles asynchronous code quite well.
7
u/bitbldr Mar 16 '24
Really been enjoying it. Coming from Elixir, having a simple syntax and rich type system makes modeling domain data really straightforward. If anyone is interested in building web apps, be sure to check out Lustre or if you are interested in react-like server live views, I created a library called Sprocket
4
u/[deleted] Mar 14 '24
Love it!
4
u/WallyMetropolis Mar 14 '24
I love trying new programming languages, and gleam looks fun. But I don't think I have the headspace right now to really give it a try.
I do kinda wish it had more support for metaprogramming. It's not particularly en vogue these days and basically only Lisps do this with full commitment. But I keep kind of hoping some language will come along that will inspire new, broad interest in metaprogramming.
3
u/aulizko Mar 14 '24
Looks promising. I plan to play with it on vacation, maybe do some toy projects.
As for using it for production, I'll wait and see
4
u/yawaramin Mar 14 '24
I don't see a viable way to abstract behaviour over types, like eg Go interfaces or Elixir protocols/behaviours.
2
u/77hscottyh77 Mar 15 '24
I really like it. I love how focused it is on keeping it simple.
2
u/fredsq Mar 14 '24
tried the language tour and it looks great. very easy to grok and has everything javascript does wrong, done right.
i wanna see if there’s DOM bindings available and if so maybe try building a frontend app with it?
2
u/crowdhailer Mar 16 '24
I've used it in production 3+ years ago. it was great then and has only got better since.
I've never delivered so quickly as when using Gleam
2
u/Shoddy-Conflict9375 Mar 14 '24
It has some rust concepts(monad) with syntax sugar 60% + philosophy of golang 30% + kotlin for fp 5% + elixir 5% i think.
1
u/Either-Yam9659 Aug 22 '24
Are there some companies using it in production? :)