What language should I use for an IF coding tutorial?

Perl is a bewildering parallel-universe version of programming. You can write clear and readable Perl, but I don’t see much of it. :wink: I wouldn’t recommend it purely because of having to manually get function arguments via shift, or destructuring, etc. Also, error handling without algebraic types is often pretty messy. I see that there is an algebraic types library for Perl, which lifts my evaluation of the language. Is it used for error handling though?

Actually algebraic types make reasoning about optional parameters so much safer that I’d probably prioritise teaching a language with native support for them over any that use null parameters. That doesn’t include TypeScript either, sadly, as you have to manually handle the tagged unions.

2 Likes