News for hackers. Stuff that matters.
Re:Golang generics proposal has been accepted by acoard on Wednesday February 10, 2021 @03:59PM (#26094708)
>Actually, javascript is the only language that has it right. Not only can anything be null, anything can be undefined, (which isn't even remotely similar and anyone who doesn't understand why doesn't belong in the conversation,) AND values you don't know about can exist.

If you mean `unknown`, that's a TypeScript thing.[0]

And personally I love working on a code-base and with coders that differentiate between null and unknown. But there's no denying it's a footgun and many get no value besides bugs from these two. It's kind of similar to how JS gets boolean comparisons weird, which is worked-around by convention

[0] https://www.typescriptlang.org/docs/handbook/release-notes/t...

There are no comments on this comment yet.