The best part of Gleam in my opinion is the language's design. It's just so elegant to read and write. Take this example code snippet from the release notes:
pub fn find_book() -> Result(Book, LibraryError) {
case ask_for_isbn() {
Error(error) -> Error(error)
Ok(isbn) -> load_book(isbn)
}
}
It's a trivial code snippet, but I'm finding this kind of "first class" pattern matching produces very readable, elegant-looking, well organized code.There was a discussion the other day about the pipe operator being added to PHP 8.x. Gleam was my first language which included a pipe operator. Now, having used it a bit, I feel every language should have something like it.
pub fn hello_test() {
telephone.ring()
|> should.equal("Hello, Joe!")
}
The pipe skips so much boilerplate and clearly communicates intent. Absolutely love it.[1] https://gleam.run/news/no-more-dependency-management-headach...