News for hackers. Stuff that matters.
Re:Perseus – NextJS alternative in Rust by madeofpalk on Sunday April 09, 2023 @01:35PM (#35504766)
I think that Typescript is a gateway drug for a language like Rust. Developers who like the strictness and ergonomics of strict Typescript could be attracted to taking that “to the next level” with Rust.

Where I think Go turns away these developers (at least it did for me…) due to having null-pointer/non-existent nullability.

Re:Perseus – NextJS alternative in Rust by _gabe_ on Sunday April 09, 2023 @04:39PM (#35506261)
> This is contrasted to Go, which I think turns away these developers (at least it did for me…) due to having null-pointer/non-existent nullability.

As opposed to Typescript's null, undefined, or optionally defined types? I don't use Go or Rust, but I do use Typescript so maybe I'm a bit confused by this statement. Go allowing nullability doesn't seem like a dramatic shift from Typescript's 3 different ways to represent a potentially ill defined object, and it wouldn't turn me away from the language.

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.