Brutkey

mathew
@mathew@universeodon.com

@alcinnz@floss.social They’re all terrible. Typically when a new one turns up and I wonder if I should try learning it, I read the intro and FAQ and some example code and see if I can make it through those without a combination of disbelief and horror. Usually I can’t.


mathew
@mathew@universeodon.com

@alcinnz@floss.social Actually I just remembered I wrote a whole article about this:

https://lpar.ath0.com/posts/2023/12/language-wish-list/

bkim
@bkim@mastodon.social

@mathew@universeodon.com @alcinnz@floss.social I'm a 99/100 with you, except for the "undesirable" part. How do you program without nulls or a zero value?? You'd have to have a sentinel value or an out-of-band boolean to indicate absence pretty often.

mathew
@mathew@universeodon.com

@alcinnz@floss.social @bkim@mastodon.social It’s important to distinguish between null and the zero value. Unfortunately C-like languages obscure the difference by doing #define NULL 0. Having zero values for most types is OK (pointers are an exception, but pointers cause a lot of other problems). It’s null that tends to ruin language safety. If an integer X can be zero, that’s fine, you still have an integer type you can always increment. If an integer can be null, you have a problem.