
2 Apr
2008
2 Apr
'08
10:11 p.m.
Ross MacGregor wrote:
I just created a very small smart pointer libary for our project. It will contain two types of shared pointers: SharedHandle and NullableSharedHandle. SharedHandle will be a shared pointer that cannot be null by ensuring a non-null construction while NullableSharedHandle will basically be a typedef for boost::shared_ptr.
I firmly believe that code can be made more reliable by minimizing the use of nullable pointers.
[snip] Your idea certainly could be useful. It should probably be combined with the Null Object Pattern. However, having many different smart pointers would make it more difficult for different software components to interact with each other. --Johan Råde