Gleam v1.12
github.com
Gleam v1.12
1–10 of 91 posts
Re: Gleam v1.12
#2The 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...
Re: Gleam v1.12
#3Some highlights from this release are listed here[1]. 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" pa…
Re: Gleam v1.12
#4Some highlights from this release are listed here[1]. 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" pa…
I'm so envious of this. In TypeScript I use ts-pattern and Effect Schema, and while they make this logic way nicer, it's insanely verbose and doesn't offer any of the niceties of being first class.
I've exclusively used the BEAM/Erlang target so far - but the js community within Gleam seems quite interesting.
Re: Gleam v1.12
#5Some highlights from this release are listed here[1]. 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" pa…
Re: Gleam v1.12
#6Some highlights from this release are listed here[1]. 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" pa…
Interesting. I was just about to write the opposite. I tried Gleam to solve last year's Advent of Code, and it felt like a weird mix between Rust and Elixir. You can't write code as elegantly as you'd do in Elixir, which was somewhat disappointing. I switched back to Elixir after a couple of days. I think the biggest advantage of Gleam is static type system.
Re: Gleam v1.12
#7Some highlights from this release are listed here[1]. 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" pa…
>It's just so elegant to read and write. Interesting. I was just about to write the opposite. I tried Gleam to solve last year's Advent of Code, and it felt like a weird mix between Rust and Elixir. You can't write code as elegantly as you'd do in Elixir, which was somewhat disappointing. I switched back to Elixir after a couple of days. I think the biggest advantage of Gleam is static type system.
The two languages are almost the same at the value level, so code should translate across well.
Re: Gleam v1.12
#8Some highlights from this release are listed here[1]. 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" pa…
>It's just so elegant to read and write. Interesting. I was just about to write the opposite. I tried Gleam to solve last year's Advent of Code, and it felt like a weird mix between Rust and Elixir. You can't write code as elegantly as you'd do in Elixir, which was somewhat disappointing. I switched back to Elixir after a couple of days. I think the biggest advantage of Gleam is static type system.
Gleam seems to have a lot of obvious influences from Rust, and the creator is a rust dev.
While the Gleam ecosystem is vastly less mature than Elixir's or Rust's (because it's literally younger), the language itself, I've found, is vastly more pleasant to read/write. YMMV of course.
Re: Gleam v1.12
#9> As a community, we want to be friendly too. People from around the world, of all backgrounds, genders, and experience levels are welcome and respected equally. See our community code of conduct for more. Black lives matter. Trans rights are human rights. No nazi bullsh*t.
On one hand I applaud that their community standards are inclusive, but on the other hand, it shouldn't be that blatantly ideological from the get go. It's just another programming language, not a political platform.
Re: Gleam v1.12
#10Earlier quoted context omitted.
I'm so envious of this. In TypeScript I use ts-pattern and Effect Schema, and while they make this logic way nicer, it's insanely verbose and doesn't offer any of the niceties of being first class.
I have not used it at all, but Gleam does have a javascript target in it's compiler/build-tool. So in theory, you can write Gleam (strongly typed, etc) and produce js. I've exclusively used the BEAM/Erlang target so far - but the js community within Gleam seems quite interesting.