logoalt Hacker News

mike_hocktoday at 1:23 PM1 replyview on HN

> But sometimes you must act on exceptional situations, recover, take alternative route, provide default

And then the Rye version is presumably just as verbose.

> or translate exception from lower level one to a higher level one

This is the actual flaw in exception-based languages. Adding context should be much more convenient.


Replies

middayctoday at 1:35 PM

Then the rye code "needs more meat" too yes, but not that much changes, |fix { code } already does the fixing and provides an alternative, |^check { failure construct dialect }, already wraps received failure into a new one you construct, and exits to caller. There are other such functions but these two are most common.

Additional benefit I see, they already express intent. Like map, filter, reduce express intent better than foreach loop.