User forums > Help

NULL undefined

<< < (5/8) > >>

JGM:
I have learned a lot from this discussion, jajaja  :D

killerbot:
just checked a few more compilers :  Digital Mars, MSVC8[aka 2005], OpenWatcom. Most of them define NULL in a *lot* of headers. In this is really causing a lot of code to break (in MingW I have the impression it is only in stddef, Borland does it in _null.h) because very little people are including the correct header.  So we could blame compilers, users, but not the standard.

And the arguments are not crap, sorry :
 - 1 definition in 1 place [but that's what the standard says according to the above quote : cstddef], but s you can see your compiler doesn't always do it
 - minimize compiling dependencies [using 0 --> no include needed]
 - implementation dependent , who will tell how a compiler vendor decided to implement it [an old implementation is according to the standard [as in Dewhurst's book] no longer accepted]
 - the lesser of the PreProcessor 'beast' can be used, the better [there are always valid use cases for the PP, but way little then people tend to think]


PS : gonna try to find out where I 'mislearned' the fact NULL is not standard. I got it out of a book or in a C++ presentation (by well respected people), because I remember I was surprised at the time and later on changed my code and style, since I used NULL before that day. But won't ever use it again ;-)

orefa:

--- Quote from: wwolf on September 18, 2007, 01:28:06 pm ---[...] bullfeces [...] crap [...] madness [...] crap.

--- End quote ---


--- Quote from: wwolf on September 18, 2007, 01:35:49 pm ---Whatever I say tends to come out is if it used the wrong end...
--- End quote ---

Gosh, I wonder why. I also wonder why you continued this even after Killerbot corrected himself, showing a good deal more maturity than yourself.

Anyway, I also did learn something from this thread, both about C++ and about the character of the participants.

killerbot:
let's remember we gained knowledge about C++.

wwolf:
Let's assume that killerbot is able to get offended without your help.  :P  If he wants to. Apparently, that isn't the case.

BTW the reason I have written those words down (thank you for misquoting them by removing the parts that has softened their meanings, you have really made a great disservice to yourself to use such politician's moves) is simple. We have been going around and around in a topic, where facts where misrepresented. Facts, such as that NULL is standard, and (lately) that Digital Mars is far from being standard. MSVC later editions are somewhat better than 6.0 was, but MS still owes us a lot of fixes - where their compiler does not follow the standard. I do not think NULL falls into this category tough...

Anyways, when the sky is blue and the grass is green, and someone insists it is not so, because God told him so... At some point of time the discussion has to be cut short. Mainly to limit the damage. In this case, I had to tell that the "non-standard" part is nonsense, and the non-portable part is a weak argument nowadays. And I have also presented practical reasons why NULL can be a good choice.

BTW it seems that killerbot was able to understand that I have been judging the technical content of what he has said, and not him. And yes, I have told my opinion about his behavior (not reading the standard, ranting etc.) - mainly because I felt this was part of why we could not communicate... but only exchange posts.

Anyways, my goal was not to upset anyone, but to clarify the situation and to (kindly;) ) ask that people please tell when they are sounding an opinion (as opposed to citing facts) and also to tell the reason(s) why they hold that opinion. You are free to point out if I miss that myself. I do it, I know. :)

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version