News for hackers. Stuff that matters.
Re:C++11 Makes Competitors Go Rusty by anonymoushn on Wednesday February 01, 2012 @06:13PM (#3540559)
Can I just trade in my exceptions for Maybe or Either? It's already possible to do both of these things, the trouble is that I have to use other people's code that uses exceptions.
Re:C++11 Makes Competitors Go Rusty by evincarofautumn on Wednesday February 01, 2012 @07:22PM (#3540819)
Except the C++ dragon rears its head. How do you build an intelligent Maybe or Either type in C++? Should they be value types containing unions? You can’t use “non-trivial” types in unions till C++11, and a lot of people haven’t yet upgraded. Referential types with dynamic allocation? How do you transfer ownership? Are “Left” and “Right” subtypes of “Either”? It’s ridiculous.
Re:C++11 Makes Competitors Go Rusty by SamReidHughes on Wednesday February 01, 2012 @09:40PM (#3541193)
The choices are clear for every situation you describe.
Re:C++11 Makes Competitors Go Rusty by evincarofautumn on Wednesday February 01, 2012 @11:03PM (#3541364)
To you, to me, but not to most C++ users. Yeah, these types should be in a library, but that’s not the point. A programmer shouldn’t have to be on par with the Boost writers to make something this conceptually simple. I’ve used C++ as my primary language for years and only now can I speak with authority on the finer points of the language. It’s quite powerful, but so unpleasant.