this post was submitted on 11 Aug 2024
11 points (100.0% liked)

Gleam

80 readers
8 users here now

A community for the gleam programming language! https://gleam.run/

founded 10 months ago
MODERATORS
 

The blog post is the author's impressions of Gleam after it released version 1.4.0. Gleam is an upcoming language that is getting a lot of highly-ranked articles.

It runs on the Erlang virtual machine (BEAM), making it great for distributed programs and a competitor to Elixir and Erlang (the language). It also compiles to JavaScript, making it a competitor to TypeScript.

But unlike Elixir, Erlang, and TypeScript, it's strongly typed (not just gradually typed). It has "functional" concepts like algebraic data types, immutable values, and first-class functions. The syntax is modeled after Rust and its tutorial is modeled after Go's. Lastly, it has a very large community.

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 3 months ago

Huh, the parenthesization thing is interesting. Programming languages so often pretend to be maths, because in specific situations, people do a lot of maths with them, and you get a familiarity bonus for it.

But yeah, it's often clunky. I know in Rust, it's a real problem that they can't distinguish whether you're using < to compare the size of two numbers or to specify generics, which is why the turbofish-syntax exists.
And yeah, it just rarely feels actually worth it, as you could just as well write 3.less_than(5).

This parenthesization thing is definitely another such case, which I hadn't considered yet.
I imagine, for most languages, it isn't too big of a deal to have a special casing for that, as it mostly only overlaps with tuple-syntax, but for languages with implicit returns out of { }, it's kind of an unnecessary oddity in the syntax.