5 ms·
Shot in the wind, but is there a plan for different syntax? For those who've become comfortable in different fp camps, I can't really see myself picking up curl
by adenozine 5y ago
Shot in the wind, but is there a plan for different syntax? For those who've become comfortable in different fp camps, I can't really see myself picking up curly brackets and C-style code again. I really like the idea(s) of this project, but it's the thought of staring at that kind of code that's just a bit too much. I'd rather do something like [Nim,Scala,Clojure,F#]->JS if I needed to have that.
I've always kinda felt that there's a lost opportunity for extensible syntaxes by doing things this way rather than having the main surface of a language be some sort of intermediate representation (A la Wasm, LLVM IR, JVM, et al)
Congrats on the release regardless. It's good to see big stable projects in this niche in the BEAM-verse. The world needs more type safety.
- lpil 5y agoUnlikely I'm afraid. We used to have an ML style syntax but once we switched to a more mainstream syntax we had a big surge in popularity and interest. I am very fond of the ML syntax, but I think it is the semantics and type system that really matter, so I am very happy to sacrifice syntax in order to make Gleam more widely accessible.
- G4BB3R 5y agoIs it possible that the popularity increase albeit being correlated to the syntax changes, was not caused by it?
- rkangel 5y agoIt is possible, but would be an interesting co-incidence. More anecdotal evidence, but Elixir has an easier time with adoption that Erlang and a big part of that reason is syntax. It's superficial, you get past it quickly, but it's the first thing you encounter and that can affect whether people give a language a 'proper' go.
- lpil 5y agoThere certainly were other factors, but people have been quite vocal in their enjoyment of the new syntax. I think the ML people like me are kinda used to not getting their favourite syntax. Alas!
- adenozine 5y agoThanks for the response! That's very cool, I wouldn't have thought that the trend would swing that way. I suppose it makes sense in a conventional wisdom kind of way. How long ago was the switch? I'd like to read (code or prose, idc) about your experiences switching the syntaxes out. That's a hard thing to do right, but maybe not so much if it was really early on?
- lpil 5y agoThe big switch was maybe about 3 years ago? v0.5 had a few more changes away from the ML style too https://gleam.run/news/gleam-v0.5-released/ https://gleam.run/news/gleam-v0.5-released/
- ch4s3 5y agoYou may prefer alpaca[1] which is in the ML family and on the BEAM. Someone could target Core Erlang [2] or BEAM byte code directly and offer a pluggable frontend for different syntax, Mix would almost allow that. I think it's just a huge lift to make happen and get everything to play nicely with BEAM semantics. But that's just like my opinion. [1] https://github.com/alpaca-lang/alpaca https://github.com/alpaca-lang/alpaca [2] https://blog.erlang.org/core-erlang-by-example/ https://blog.erlang.org/core-erlang-by-example/
- adenozine 5y agoRight, I see. I wasn't aware of Alpaca, that's quite cool. I've read a little bit about Elixir and about how it's basically a big box of macros and magic dust that goes down to simple, straight erlang in the end, if I had more time I'd love to dig into their compiler. Alpaca looks very neat, and ML is right up my alley. thanks again for showing this! I can admit I am no BEAM expert and it seems my thought offended the experts, but I just like the aesthetic of modularity played out to the logical conclusion of syntactic extensions unto intermediate forms.
- lpil 5y agoSadly Alpaca development has stopped. One of the reasons I started Gleam is that I was working on the Alpaca standard library and realised that the bugs I was reporting were not getting fixed.
- ch4s3 5y ago> I can admit I am no BEAM expert and it seems my thought offended the experts Who knows? I didn't find the musing particularly off putting. As Alpaca is apparently dead there's also LFE[1] and Hamler[2]. Most devs in the space stick to either Elixir or Erlang so ymmv. [1] https://github.com/lfe/lfe https://github.com/lfe/lfe [2] https://github.com/hamler-lang/hamler https://github.com/hamler-lang/hamler
- lpil 5y agoPurerl is another good one to look at. It's an alternative backend to the PureScript compiler, which is quite a popular language!
- n42 5y agoIt’s still super early on but I think this is one of the motives behind Lunatic: https://github.com/lunatic-solutions/lunatic https://github.com/lunatic-solutions/lunatic
- adenozine 5y agoThis is an absolutely fascinating project. I'll be keeping a close eye on it for sure! I had hoped that Go would eventually kind of serve this role in the PLT world, years ago when it was first announced. Sadly, it's morphed a lot over the years into something entirely different.