News for hackers. Stuff that matters.
Re:Perseus – NextJS alternative in Rust by madeofpalk on Sunday April 09, 2023 @05:22PM (#35506602)
null/undefined is type checked in Typescript so the compiler will make sure you check whether your value is defined or not and handle it appropriately.

Go having nullability isn’t the problematic part - it’s how nil is not type checked, so a value might secretly be nil and you won’t know until your program crashes at runtime.

Rust avoids this by just not having null, instead using things like Result and Option types, which is pretty neat with pattern matching.

There are no comments on this comment yet.