We actually used to have an ML syntax a year or two ago! We ended up dropping it to be more familiar to a wider collection of people (which has been a very popular decision). I mildly prefer ML syntax, but whatever makes Gleam more friendly to more people is good by me!
GraphQL is probably quite a way away. I would love a GraphQL server library like the one in OCaml (it’s type safe without any codegen), but we would need a few more fancy type system features first (GADTs for example).
The others are not so far off
Gleam intends to only have one way of writing any one thing, so we will not support flow control based on multiple function heads as this is duplication of the case expression feature.
The Erlang compiler (and thus the Elixir compiler) actually rewrites multiple function heads into a single function with a case expression, so there’s no practical difference between the two.
I’ve not made any notes on purity as the vast majority of languages are impure. Elm is the only language I can think of that is actually pure (providing you ignore the Debug module, the runtime, and the fact that equality is not total).
To be clear Gleam is a functional language with side effects (like OCaml or Erlang). Later we’ll have a better website, but for now we are focusing on building the language itself.
Thanks for the feedback! You’re the first person to raise this question, so I think it is quite a niche question.
It would be great to be able to always give a clear picture of the language from the get-go, but what questions need to be answers depends on who the reader is. Here’s some questions I have received from people first viewing the language:
- Are there side effects?
- Is there a web framework?
- Does it compile to native?
- Can I use it in AWS lambda?
- Does it have higher kinded types?
- Does it have dependant types?
- Does it have objects?
- Does it have Erlang’s maps?
- Are processes types?
- Is there mutable state?
- Can I use it for graphics programming?
- Are there first class modules?
- Are there type classes?
- Can I run it in the browser?
- Are there macros?
- What kind of metaprogramming is there?
- Are there polymorphic variants?
- Can it compile to Go?
- Are there row typed records?
And so on! It’s really difficult to answer all these questions without writing a long, boring essay on the home page.
Also, Elm doesn’t answer any questions about side effects or purity on it’s home page either!
Yes, that’s right.
At the moment we’re largely marketing to Erlang + Elixir users, so they have a full understanding of why the BEAM is special and has value, so we don’t attempt to explain that to them. We’ve largely been focusing on explaining why types have value.
Later on we will improve upon this, and have a website with an introduction that is designed to explain the value of the Erlang way to people from other ecosystems.
While the written documentation is lacking here I have given talks to more general audiences, so if you’d be interested in learn more about the philosophy and value of Gleam then it may help a little.
Otherwise I’m extemely happy to answer questions about Gleam and Erlang in general!
Gleam builds on top of Erlang, so it out-classes those languages in terms of durability, scalability, and latency. It is an extremely reliable and performant runtime that makes multi-core and distributed computing comparitively trivial.
Once we have matured I am confident that Gleam will provide a nicer and easier development experience for web application backends than those languages, while also providing superior performance without any specific optimisation required by the user.