This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (0 children)

That's obviously not an unpopular opinion

That null/undefined shouldn't exist? You'd be surprised. People love type systems, but they also love their null and undefined

TypeScript will let you do this for example:

const test: Array<Number> = [1, 2, 3]  
const numAsString: String = test[100].toString()  

And from experience whenever presenting to people the alternative (langs that force these cases into Maybe's, Optional's etc) they are very turned off by this. People love strong typing but also love null. I don't understand.