One niche feature of Erlang that I love is live module upgrades, particularly via gen_server's code_change/3 callback. It's a neat little trick that seems to be rarely used in practice, but every single time I've used it I just loved how everything simply clicked together, providing zero disruption with nearly minimal effort (for simple state upgrades or downgrades).
I wonder if it's supported with Gleam and/or gleam_otp? Don't see it in the docs.
the gleam tour is also very good https://tour.gleam.run/
very very good
Gleam has been great as I've started messing around with it recently. Coming from primarily Ruby, it feels much different and I'm liking expanding my thought process around programming. I'm struggling a bit with learning how to think in the type system though. Without unions and a requirement that case statements all return a single type, I just haven't quite grasped the right pattern to make it all click. Enjoying the process none the less.
I like the look of Gleam over Elixir for sure. I’d love to see some example code showing Gleam-based LiveViews but I haven’t been able to find it anywhere. Is it possible? Anyone have some code to point me at?
“Gleam is a statically-typed language, meaning you must declare the type of a variable before using it.”
That second part is wrong. Gleam has type inference.
I honestly gave gleam a serious look, considering it to build a system that might really benefit from it's concurrency model. However the lack of Macros/macro-style reflection capabilities really put me off. It makes working with SQL databases needlessly verbose. It's the same with go, though go posses the capabilities to directly unmarshal SQL rows into a structure with tags, it's far from straightforward.
golang concurrency vs gleam concurrency vs rust concurrency? for a webserver?
> Gleam is a statically-typed language, meaning you must declare the type of a variable before using it.
What year is this from?
> fn add(x: Int, y: Int) -> Int
Why do language authors insist the majority of programmers want to type this way? Meaningless arrows and redundant colons.
Is it constructive, like it will lead us to think differently? It feels more like a contest in overcomplicating something as innocent as:
int add(int x, int y)
[dead]
I've been interested in Gleam, but I didn't realise it just transpiles to Erlang, I thought it compiled directly to BEAM bytecode. Bit of a turnoff to be honest, I really don't want to deal with transpilation.