lpil

lpil

Creator of Gleam

Video: Using Gleam's 'try' syntax by Michael Jones

Michael published this video today on the how and why of Gleam’s new try syntax. I thought it would be a good first bit of content to share here on devtalk.

I hope he makes more Gleam educational snippets in future!

31 1280 6

Most Liked

rasputin303

rasputin303

I liked this, and your Elm video too!

One other thing that might confuse people about the try syntax is what to do if your results have different error types. If you are looking for ideas for videos, maybe a follow-up about how to use map_error would be useful too.

AstonJ

AstonJ

I reckon Michael should sign up gleam[casts].com! He’s got a good voice and everything was at a relaxed pace which is ideal for screencasts imo :+1: (I don’t think he’s signed up yet otherwise I would have @'d him, haha!)

lpil

lpil

Creator of Gleam

At the moment the plan is to only have this Result specialisation. Later we may introduce traits, interfaces, or some other form of metaprogramming/ad-hoc polymorphism, at which point we could look at expanding this.

Where Next?

Popular Backend topics Top

PragmaticBookshelf
Good API design means starting with the API-first principle—understanding who is using the API and what they want to do with it—and apply...
3 1778 0
New
PragmaticBookshelf
The next step in the evolution of user interfaces is here. Chatbots let your users interact with your service in their own natural langua...
12 2112 6
New
PragmaticBookshelf
Functional languages have their own patterns that enable you to solve problems with less code than object-oriented programming alone. Thi...
6 1828 2
New
PragmaticBookshelf
Develop your intuition for practical Python patterns as you use new modules and tools to write clean, efficient, and correct Python code....
5 2213 1
New
PragmaticBookshelf
Level up your Rust programming skills with a series of brain teasers as you discover some of the unexpected Rust behaviors and challenge ...
13 2143 2
New
ManningBooks
Effectively reading and understanding existing code is a developer’s superpower. In this book, you’ll master techniques for code profilin...
9 1808 2
New
PragmaticBookshelf
Communicate more clearly, refactor more effectively, and save time with attractive diagrams that only take minutes to make with open sour...
6 1995 1
New
PragmaticBookshelf
Build modern server-driven web applications using htmx. Whatever programming language you use, you’ll write less (and cleaner) code. ...
6 1534 3
New
PragmaticBookshelf
An illustrated guide to understanding and effectively using regular expressions. Staffan Nöteberg To effectively use regular expressi...
2 1409 0
New
PragmaticBookshelf
Fight complexity and reclaim the original spirit of agility by learning to simplify how you develop software. The result: a more humane a...
10 1290 8
New

Other popular topics Top

Exadra37
I am thinking in building or buy a desktop computer for programing, both professionally and on my free time, and my choice of OS is Linux...
36 5432 10
New
Exadra37
Please tell us what is your preferred monitor setup for programming(not gaming) and why you have chosen it. Does your monitor have eye p...
227 8684 88
New
gagan7995
API 4 Path: /user/following/ Method: GET Description: Returns the list of all names of people whom the user follows Response [ { ...
7 3059 3
New
AstonJ
If you get Can't find emacs in your PATH when trying to install Doom Emacs on your Mac you… just… need to install Emacs first! :lol: bre...
4 4891 0
New
First poster: bot
The overengineered Solution to my Pigeon Problem. TL;DR: I built a wifi-equipped water gun to shoot the pigeons on my balcony, controlle...
0 4367 0
New
AstonJ
If you want a quick and easy way to block any website on your Mac using Little Snitch simply… File > New Rule: And select Deny, O...
5 8045 3
New
PragmaticBookshelf
Author Spotlight Erin Dees @undees Welcome to our new author spotlight! We had the pleasure of chatting with Erin Dees, co-author of ...
24 3704 11
New
PragmaticBookshelf
Author Spotlight: Bruce Tate @redrapids Programming languages always emerge out of need, and if that’s not always true, they’re defin...
54 4591 23
New
CommunityNews
Will Swifties’ war on AI fakes spark a deepfake porn reckoning?
0 5956 0
New
AstonJ
If you’re getting errors like this: psql: error: connection to server on socket “/tmp/.s.PGSQL.5432” failed: No such file or directory ...
1 2188 1
New