Is it a good practice to wrap all primitives and Strings?

Posted by Amogh Talpallikar on Programmers See other posts from Programmers or by Amogh Talpallikar
Published on 2013-06-25T09:16:29Z Indexed on 2013/06/25 22:28 UTC
Read the original article Hit count: 402

According to Jeff Bay's Essay on Object Callisthenics,

One of the practices is set to be "Wrap all primitives and Strings"

Can anyone elaborate on this ?

In languages where we already have wrappers for primitives like C# and Java. and In languages where Collections can have generics where you are sure of what type goes into the collection, do we need to wrap string's inside their own classes ?

Does it have any other advantage ?

© Programmers or respective owner

Related posts about design-patterns

Related posts about object-oriented-design