News for hackers. Stuff that matters.
Re:Gleam Is Pragmatic by rossng on Sunday October 06, 2024 @03:34PM (#41759602)
Hmm, it definitely looks more interesting in combination with effect handlers. Still not sure I find it super compelling in Gleam vs just not using callbacks.
Re:Gleam Is Pragmatic by jitl on Sunday October 06, 2024 @04:18PM (#41759946)
It’s a generalization of async/await syntax in languages like JavaScript or Swift. I like that it provides a generalized syntax that could be used for coroutines, generators, or async/await without adding any of those specifically to the language syntactically.

One level of callback nesting in a function is totally fine, two is a bit confusing, but if you have many async things going on do you really want 10, 15, 20 levels of nesting? What to do about loops?

I certainly greatly prefer async programming with async/await languages that keep the appearance of linear function execution to stacking my callbacks and having a ton of nesting everywhere

Re:Gleam Is Pragmatic by vips7L on Sunday October 06, 2024 @05:46PM (#41760601)
Sounds like the new “capabilities” stuff in Scala.