Thread with 14 posts
jump to expanded postok i'm sold
it's a language for beam (the erlang vm), that's probably where the name comes from. syntax is clearly heavily inspired by rust and, like rust, it has algebraic data types and pattern matching. unlike rust it hasโฆ a continuation-passing operator??? wow (it's called use
)
IMPORTANT UPDATE this is what happens when you click on the https://gleam.run/ star
what the hell, the gleam โcheatsheetsโ claim gleam does not have โlogicalโ &&
or ||
, only โbooleanโ &&
and ||
. what does that mean? no short-circuiting? it seems like it short-circuits to me. also wait does this language not have bitwise operators??? why
i filed an issue for the documentation thing
anyway gleam seems pretty cute, and this word feels fitting? it's trying to be small-ish and โfriendlyโ. in its syntax, static typing and algebraic datatypes, it's like rust, but otherwise it feels like a simplified haskell: immutable data only, linked lists, no typeclasses
being statically-typed and targeting erlang's vm, beam, is an interesting choice. at first glance it seems appealing but i would be worried that this will cause problems once you're dealing with hot reloading and message passingโฆ
that continuation-passing operator thoughhhh ๐๐๐ https://gleam.run/news/v0.25-introducing-use-expressions/
oh and it has labelled arguments in function calls, that makes the objective-c enthusiast in me happy :3
@hikari Gorgeous. I wanted to write something like that for a little language for a build system. This seems far more thought-out than what I had in mind.
Honestly, if I were to pursue this project, I think I might try building it on top of Gleam and abandoning my own language. Seems far more practical and quite well-suited.
I wish it had a concept of pure functions, but otherwise, looks cracking.
@hikari oh this looks like just, monad do notation? but without all the laws. Cute approach
@porglezomp yeah!!! and allegedly a bit more powerful?
@hikari I presume the way itโs more powerful is that each `use` can have a different type, so `use a <- f` is like `do a <- f` and not just `a <- f` so you avoid extra nesting? Otherwise it looks like the same thing.
@hikari "logic" doesn't "scale", obviously