12 ms·
First exposure to gleam here and I'm impressed. I am somewhat puzzled though, as I don't see any references to otp/actor examples on their "language tour", whic
by drzaiusx11 3y ago
First exposure to gleam here and I'm impressed. I am somewhat puzzled though, as I don't see any references to otp/actor examples on their "language tour", which I would have guessed is the main use case coming from Erlang for at least the server side. Are they deemphasizing otp since it targets both Erlang AND JavaScript? Presumably for the gains of "one lang" across the stack like node/deno provides?
- lpil 3y agoOTP isn't part of Gleam the language, it is a library. This is true of Erlang too, but in Erlang they tend to sell both the language and the actor framework at the same time. With the introduction we want to stress the language rather than that actor framework you may or may not chose to use in your programs. 95% of programs don't involve an actor system, and learning to use OTP is very challenging, so this shouldn't be the first thing you're greeted with when learning the language. That's the theory at least!
- drzaiusx11 3y agoPardon my ignorance, but my thought was that Erlang/OTP was pretty much the reason folks used Erlang in the first place. I guess that's no longer true these days?
- lpil 3y agoAll programs using the BEAM runtime will be using OTP, but that doesn't mean you'll be actually writing OTP framework code, you'll almost always be using higher level interfaces instead.
- ricketycricket 3y agoLooks like it is an external library[^1]. Readme states it is experimental and lists some limitations. [^1]: https://github.com/gleam-lang/otp https://github.com/gleam-lang/otp
- lpil 3y agoThis is also true of Erlang. OTP is a series of libraries and not part of the language.