Forgot your password?
typodupeerror

Comment Re:Null as a concept (Score 1) 612

I probably am but conceptually the problem with RAII in C++ remains. Sometimes initializing every single thing can lead to a lot of wasted and useless work. An argument that was brought up on lambda the ultimate was arrays of some non-nullable type. In C++ you can get around it if you have a type that has a do nothing constructor. It will still be just as error prone if not more so but at least when I resize my vector to 1024 it doesn't sit there filling it in with 0.0f or some other number that will soon be replaced.

This why RAII is a good rule to follow most of the time but in C++ especially I find I break it more often than I would like to admit.

Comment Re:Null as a concept (Score 1) 612

I think of RIIA or however kids abbreviate it is nice concept though kind of out of place in C++. Often times it is nice to easily reserve memory for something with out having to go through the mess of having to create allocators and overload new.

Even though I dislike most of objective C it's nice being able to separate initialization and allocation easily.

I do use it quite frequently in other OOP languages such as java. Now if only they could add transitive and non-transitive constness--I guess I should just dust off ocaml-mode.

Slashdot Top Deals

"Falling in love makes smoking pot all day look like the ultimate in restraint." -- Dave Sim, author of Cerebrus.

Working...