Follow

code:
panic!("AAAAhhhh!");

Similar code:
quietly { die }

Not sure which I prefer, honestly :D

@codesections #python code:
raise Voice("and protest!")

#fortran code:
Exceptions? What is that?

@codesections I do enjoy that die is the keyword for throwing exceptions in Perl and raku. Makes for interesting conversations such as "we need to make sure the children die properly if something goes wrong"

@splatt9990 @codesections My absolute favorite perl idiom is that you can write

$dbi->connect or die;

and it does exactly that.

@splatt9990 @codesections In #rakulang there's also the `throw` method, available on Exceptions. The regular `die` just throws a default exception, which is great for prototyping, though I prefer to write more specific exception classes and throw those once I get the proof of concept working.
Sign in to participate in the conversation
Fosstodon

Fosstodon is an English speaking Mastodon instance that is open to anyone who is interested in technology; particularly free & open source software.