tgockel / json-voorhees

A killer modern C++ library for interacting with JSON.
http://tgockel.github.io/json-voorhees/
Apache License 2.0
128 stars 18 forks source link

Don't use nullptr for null #38

Closed tgockel closed 9 years ago

rec commented 9 years ago

Why don't you want to use nullptr? Are you wanting backward compatibility? There are very good reasons to use nullptr over NULL which is usually a macro (shudder) meaning 0L.

At the very least, you should use some other symbol that can be defined to be nullptr for those of us with a modern C++ compiler. :-)

tgockel commented 9 years ago

It won't be replaced with NULL, but something like jsonv::null. The issue with using nullptr is that it represents "nullness" in C++ space, but not really in JSON space (where null is a value of sorts). Imagine the error-proneness of jsonv::value*.

tgockel commented 9 years ago

Check out 652e0eee37f8991d28850f8bca73b6cc9a7b67a9 if that wasn't clear :-)

rec commented 9 years ago

Got it! Good move. :-)