Nulls in strongly typed languages can get rather weird but from a C/C++ perspective it is the same as 0. nullptr is just a correctly casted 0.
NULL: The worst mistake of computer science? (2015)
11–20 of 377 posts
Re: NULL: The worst mistake of computer science? (2015)
#12Nulls in strongly typed languages can get rather weird but from a C/C++ perspective it is the same as 0. nullptr is just a correctly casted 0.
Re: NULL: The worst mistake of computer science? (2015)
#13Other candidates: - null terminated strings - machine dependent integer widths
This is mentioned.
> machine dependent integer widths
What exactly do you dislike about this?
Re: NULL: The worst mistake of computer science? (2015)
#14Other candidates: - null terminated strings - machine dependent integer widths
Re: NULL: The worst mistake of computer science? (2015)
#15Re: NULL: The worst mistake of computer science? (2015)
#16Nulls in strongly typed languages can get rather weird but from a C/C++ perspective it is the same as 0. nullptr is just a correctly casted 0.
nullptr is actually "a prvalue of type std::nullptr_t" or something like that. Since C++11 NULL is the same as nullptr.
Re: NULL: The worst mistake of computer science? (2015)
#17Why can't people just get over it and stop blaming the language for their own sloppy code?
Re: NULL: The worst mistake of computer science? (2015)
#18"The key point here is our programmers are Googlers, they’re not researchers. They’re typically, fairly young, fresh out of school, probably learned Java, maybe learned C or C++, probably learned Python. They’re not capable of understanding a brilliant language but we want to use them to build good software. So, the language that we give them has to be easy for them to understand and easy to adopt. – Rob Pike" When d…
When people with pragmatic goals want to get large teams of new programmers productive fast, and can't expect everyone to be able to fend on their own or can afford the cost of accumulated mistakes.
>Look at react. It was designed to force functional programming concepts in an OOP manner.
Whatever that means, as React has little to do with "OOP manner".
Re: NULL: The worst mistake of computer science? (2015)
#19Whether null/NULL is a good a idea or not (I like it, just yesterday it saved my ass) it saddens me that more and more articles I stumble upon are made to criticize technologies but not to talk about solutions or innovations