davidagain

joined 5 months ago
[–] davidagain 1 points 54 minutes ago* (last edited 51 minutes ago)

The problem isn't having empty values, it's not tracking that in the type system, so the programmer and the compiler don't have any information about whether a value can be null or not and the programmer has to figure it out by hand. In a complex program that's essentially completely impossible. The innocently created bomb that causes your program to crash can be in absolutely any value.

There are ways to track it all by disallowing null and using optional values instead, but some folks would rather stick with type systems that haven't moved on since the 1960s.

[–] davidagain 1 points 1 hour ago* (last edited 59 minutes ago)

In a discussion about whether null should exist at all, and what might be better, saying that Optional values aren't available in languages with type systems that haven't moved on since the 1960s isn't a strong point in my view.

The key point is that if your type system genuinely knows reliably whether something has a value or not, then your compiler can prevent every single runtime null exception from occurring by making sure it's handled at some stage and tracking it for you until it is.

The problem with null is that it is pervasive - any value can be null, and you can check for it and handle it, but other parts of your code can't tell whether that value can or can't be null. Tracking potential nulls is in the memory of the programmer instead of deduced by the compiler, and checking for nulls everywhere is tedious and slow, so no one does that. Hence null bugs are everywhere.

Tony Hoare, an otherwise brilliant computer scientist, called it his billion dollar mistake a decade or two ago.

[–] davidagain 1 points 1 hour ago

Well, UTC didn't exist in 1800, it would have been GMT, and that might not have been too popular so soon after the war of independence. Even if you convinced all of the USA to use one time zone for the railways, it would be different elsewhere and you'd still get time zones.

Maybe you'd get further with the project with the airlines in the first half of the twentieth century, but I'm not sure that that level of internationalism would have gone down well in a rather war torn world.

[–] davidagain 2 points 1 hour ago* (last edited 1 hour ago)

Yeah, Seasonal Affective Disorder is a recognised medical condition and its symptoms get worse the further from the equator you live. Don't know why folks are downvoting you for having it.

[–] davidagain 1 points 2 hours ago

Not any more. But some of the IRS guys are smokin' hot, I'm sure, if that's what you're into.

[–] davidagain 8 points 23 hours ago (1 children)

Just a reminder to our American cousins that in British English, trump means the noise an elephant makes but also to fart: "Sorry I trumped." Donald the Trump is a noisy noxious unwanted thing on the world stage.

[–] davidagain 4 points 1 day ago

This is the way.

[–] davidagain 13 points 1 day ago

Exactly. Very well done indeed. It has a simple beauty.

[–] davidagain 19 points 3 days ago

Wise person: "Those who do not know history's mistakes are doomed to repeat them."

Actual Nazis: Great idea. Let's burn some books.

[–] davidagain 2 points 3 days ago

That is lovely. You and your mum and her friend rock. Have a great day. Every day. It sounds like your mum is a fantastic person and passed that on to you.

[–] davidagain 1 points 3 days ago

WIN.
Er, for my friend.
Yesss.
I mean yes.

 
view more: next ›