Hacker News new | past | comments | ask | show | jobs | submit login

No such thing as null? No.

But in Kotlin non-nullable types are the default. In C++ references are non-nullable. Both include nullable types too.

In that specific example, String can't be null in Kotlin and neither can string in C++, although you can make them nullable by using e.g. a pointer or an optional type.

Having everything be nullable like in Java is unarguably 100% a mistake.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: