Hurl, a terrible (but cute) idea for a language
31–40 of 84 posts
Re: Hurl, a terrible (but cute) idea for a language
#32While cute this is really close to call/cc and/or algebraic effects as an abstraction for control flow, which isn't as much "cute" as it is "a powerful way to express programs in as few expressions as possible"
I don't find this appealing on its face. Extreme terseness, even when done very elegantly, makes programs very hard to read and sometimes also hard to maintain.
I suspect that's one of the reasons Lisps (and functional languages in general) haven't caught up in popularity even as it becomes much easier to adopt one for any target and in any organization.
Re: Hurl, a terrible (but cute) idea for a language
#33Wat is a very small language which does fexprs (vau calculus), delimited continuations, delimited dynamic binding, custom algebraic effects (try catch, fibres) on top of them, modules, types, and has a metacircular VM in a few hundred LOC. It's missing a native implementation but it's very impressive.
https://github.com/GiacomoCau/wat-js
Links to the formal research are in the readme.
http://axisofeval.blogspot.com/?m=1 Has several good discussions on the topics, and are more accessible than the papers.
Re: Hurl, a terrible (but cute) idea for a language
#34While cute this is really close to call/cc and/or algebraic effects as an abstraction for control flow, which isn't as much "cute" as it is "a powerful way to express programs in as few expressions as possible"
> express programs in as few expressions as possible I don't find this appealing on its face. Extreme terseness, even when done very elegantly, makes programs very hard to read and sometimes also hard to maintain. I suspect that's one of the reasons Lisps (and functional languages in general) haven't caught up in popularity even as it becomes much easier to adopt one for any target and in any organization.
The advantage to something like call/cc is not that you can make code extremely terse but rather that there is one code path for analyzing control flow and each variant of control flow isn't a special case. It's also not more terse at all, but rather more explicit.
You don't need to force users to use it, but it is useful to define more useful mechanisms like if/else if, match/switch, throw/catch/finally, coroutines, etc in terms of an abstraction that doesn't break type checking or codegeneration.
All that said "call/cc considered harmful" is an old take
Re: Hurl, a terrible (but cute) idea for a language
#35Earlier quoted context omitted.
Hmm interesting, if anyone can help me track down why I would greatly appreciate it!
I trust you already obtained the proper licenses from your local authorities before designing and implementing a new programming language? And those licenses are on file with the major security vendors?
Re: Hurl, a terrible (but cute) idea for a language
#36Not to confuse with Hurl.dev[1], which is a net request automation tool [1] https://hurl.dev/
Re: Hurl, a terrible (but cute) idea for a language
#37Re: Hurl, a terrible (but cute) idea for a language
#38Re: Hurl, a terrible (but cute) idea for a language
#39While cute this is really close to call/cc and/or algebraic effects as an abstraction for control flow, which isn't as much "cute" as it is "a powerful way to express programs in as few expressions as possible"
Yep! Everyone should read https://overreacted.io/algebraic-effects-for-the-rest-of-us/ for how powerful this can be in practice. The caller gets to pause execution on the raising/hurling of an event - which makes many crazy things possible.