Quote:Original post by cache_hit
I get it, trust me. I just think that simplicity is a far more noble goal to strive for than consistency.
Anyway, what does the following code snippet print?
*** Source Snippet Removed ***
It'll print 2, but I think that's beside the point because there's no reasonable use case where you'd end up with the equivalent of optional<ptr>(0), unless you make it yourself... but why would you? I guess we'll have to disagree with regard to simplicity vs. consistency, though. I'm of the mind that I'd rather do something the same way everywhere and have it be slightly more verbose, than do it differently in different contexts and slightly less verbose. Obviously when it gets extreme one way or the other things are different, but I don't think this is that extreme. I also always prefer to have the code be the documentation (in addition to regular documentation) wherever possible.
Two different approaches to programming, I suspect.