Slashdot Mirror


User: read-eval-bacon-loop

read-eval-bacon-loop's activity in the archive.

Stories
0
Comments
2
First seen
Last seen
Profile
(view on slashdot.org)

Comments · 2

  1. Re:Null as a concept on Null References, the Billion Dollar Mistake · · Score: 1

    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.

  2. Re:Null as a concept on Null References, the Billion Dollar Mistake · · Score: 1

    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.