I was more than a bit put off by the code at first, since dealing with the result type seemed extremely tedious, but after the refactoring it turned out delightful. I've been learning Elixir lately but I'll be sure to check out Gleam too at some point.
this language is actually quite neat. I disliked erlang and elixir because the syntax was too far off mainstream which i get, they are functional but Gleam has gotten it right from the little I have seen here. It is easily familiarish to someone coming from another main stream non pure functional languages.
Yeah, Gleam's cool! I think Elixir's syntax is quite straightforward coming from something like Ruby, but maybe not from other languages. Erlang is its own beast but we've been appreciating its power in our #48in24 series (e.g. See the last part of th-cam.com/video/v1iU9QwpzQA/w-d-xo.html) Thanks for commenting! :)
The two languages share many strengths, but they differ quite a lot at compile time. Gleam has types at compile time, while Elixir has macros, resulting in a fairly different programming experience. You'd likely pick whichever style you find more enjoyable or productive
The main reason for me is quite simple tbh. Gleam has types and I like typed languages, I think it really helps developer experience by lots, and being a newer language brings all the benefits of our time. We learned how to have types and not be extremely hard and boring to write it, look how C# handle the typing system and how F# does, both are typed languages but F# is so easier to reason and write, and C#, even though has a strong type system, still have poor error messages and tooling. Gleam brings all those new things about types actually helping with better messages, better lsp, better everything, which at least for me Elixir lacks for example, and that is why I never used it for a real project.
Calling the to_chars function to_graphemes is the ultimate redditor "well actually" move. Im guessing that it's because it returns strings with length of one and not chars, but still. Or perhaps im the only noob who didn't know what a grapheme is.
Watch our "how to reverse a string" video. It explains what graphemes are. Most languages have some sort of to_graphemes methods nowadays - they're a critical part of modern unicode string parsing :)
Well that's a very loaded question, isn't it! Any new programming language "fragments" communities to some point. Rust and Go have fragmented the C++ community. C++ fragmented the C community. C fragmented the Assembly community etc. And Elixir fragmented the Ruby community. Everything new in life that becomes popular causes fragmentation. But that only happens if people prefer the language for some reason. So if people prefer to use Gleam to 𝑥, then Gleam will become popular. If everyone prefers 𝑥, then Gleam won't gain traction. I have no sense that Gleam is trying to "compete" with anyone. They're just building a language that they like to use. You can watch our interview with Louis if you're interested in actually understanding the thinking behind Gleam: th-cam.com/video/G7vqoR431Zo/w-d-xo.html
@exercism_org don't get me wrong - I have no complaints about Gleam as a language. What I mean more is that Elixir as a functional yet beginner-friendly language is trying to break through to the mainstream. If the community around Gleam directed its work and attention towards the development and popularization of Elixir then the chances would increase that Elixir and the functional paradigm would break through the barrier of niche languages for programming freaks....
@@coder_one Not at all! We in the Gleam team are good friends with the Elixir team and the Erlang Ecosystem Foundation, and we all work together to make the BEAM ecosystem better. Jose Valim was even one of the original sponsors of Gleam! Elixir's style of programming is very different to Gleam's style, and while many people with to use the BEAM not all of them find Elixir to their preferences. Having an alternative in Gleam means that folks who would have otherwise passed over the BEAM in favour of languages such as Elm or OCaml can now join the BEAM community.
Hi! I made Gleam! Gleam isn't a competitor at all, rather it is bringing more people to the BEAM ecosystem who would not have joined otherwise. Most people who are interested in Gleam are not people who enjoy Elixir's style of programming and would have been using other languages such as Elm, OCaml, Scala, and so on.
Fab video! Thank you Erik!!
Nice video! Gleam looks like fun Rust! I love how you wrote it like a beginner might and then refactored it into idiomatic Gleam code.
Thanks! Yeah I figured not everyone would be familiar with using Result/Option to deal with errors/missing data, so I slowly build up the solution.
I was more than a bit put off by the code at first, since dealing with the result type seemed extremely tedious, but after the refactoring it turned out delightful.
I've been learning Elixir lately but I'll be sure to check out Gleam too at some point.
This is really interesting, I think the R solution would be quite similar, but without the strong typing and compiler checks.
this language is actually quite neat. I disliked erlang and elixir because the syntax was too far off mainstream which i get, they are functional but Gleam has gotten it right from the little I have seen here. It is easily familiarish to someone coming from another main stream non pure functional languages.
Yeah, Gleam's cool!
I think Elixir's syntax is quite straightforward coming from something like Ruby, but maybe not from other languages. Erlang is its own beast but we've been appreciating its power in our #48in24 series (e.g. See the last part of th-cam.com/video/v1iU9QwpzQA/w-d-xo.html)
Thanks for commenting! :)
Great introduction. Could use some info on testing and some concrete examples of the underlying data via debug etc.
Thanks! Please do check out the full track where there's lots more info! We try and keep these pretty concise :)
Sounds good. Will do@@exercism_org
What's the main reason one would choose gleam over elixir?
The two languages share many strengths, but they differ quite a lot at compile time. Gleam has types at compile time, while Elixir has macros, resulting in a fairly different programming experience. You'd likely pick whichever style you find more enjoyable or productive
The main reason for me is quite simple tbh.
Gleam has types and I like typed languages, I think it really helps developer experience by lots, and being a newer language brings all the benefits of our time. We learned how to have types and not be extremely hard and boring to write it, look how C# handle the typing system and how F# does, both are typed languages but F# is so easier to reason and write, and C#, even though has a strong type system, still have poor error messages and tooling.
Gleam brings all those new things about types actually helping with better messages, better lsp, better everything, which at least for me Elixir lacks for example, and that is why I never used it for a real project.
👌👏
Calling the to_chars function to_graphemes is the ultimate redditor "well actually" move. Im guessing that it's because it returns strings with length of one and not chars, but still.
Or perhaps im the only noob who didn't know what a grapheme is.
Watch our "how to reverse a string" video. It explains what graphemes are. Most languages have some sort of to_graphemes methods nowadays - they're a critical part of modern unicode string parsing :)
Holy ****
Is Gleam deliberately trying to become a competitor to Elixir by further fragmenting the community into minor programming languages?
Well that's a very loaded question, isn't it!
Any new programming language "fragments" communities to some point. Rust and Go have fragmented the C++ community. C++ fragmented the C community. C fragmented the Assembly community etc. And Elixir fragmented the Ruby community. Everything new in life that becomes popular causes fragmentation. But that only happens if people prefer the language for some reason. So if people prefer to use Gleam to 𝑥, then Gleam will become popular. If everyone prefers 𝑥, then Gleam won't gain traction.
I have no sense that Gleam is trying to "compete" with anyone. They're just building a language that they like to use. You can watch our interview with Louis if you're interested in actually understanding the thinking behind Gleam: th-cam.com/video/G7vqoR431Zo/w-d-xo.html
@exercism_org don't get me wrong - I have no complaints about Gleam as a language. What I mean more is that Elixir as a functional yet beginner-friendly language is trying to break through to the mainstream. If the community around Gleam directed its work and attention towards the development and popularization of Elixir then the chances would increase that Elixir and the functional paradigm would break through the barrier of niche languages for programming freaks....
@@coder_one Not at all! We in the Gleam team are good friends with the Elixir team and the Erlang Ecosystem Foundation, and we all work together to make the BEAM ecosystem better. Jose Valim was even one of the original sponsors of Gleam!
Elixir's style of programming is very different to Gleam's style, and while many people with to use the BEAM not all of them find Elixir to their preferences. Having an alternative in Gleam means that folks who would have otherwise passed over the BEAM in favour of languages such as Elm or OCaml can now join the BEAM community.
@@coder_one I think new programming languages with different approaches can bring more people to the elixir/erlang ecosystem.
Hi! I made Gleam! Gleam isn't a competitor at all, rather it is bringing more people to the BEAM ecosystem who would not have joined otherwise. Most people who are interested in Gleam are not people who enjoy Elixir's style of programming and would have been using other languages such as Elm, OCaml, Scala, and so on.
Another useless programming language.
What programming languages do you find useful? What did you hope Gleam would do that others don't?