Help


from Wikipedia
« »  
For example, consider an add-on library for regex support on String.
In some languages, in order for the functionality to be included in strings, the functionality has to be added to the String namespace itself.
As soon as you do this, the String class becomes larger, and people who don't need to use regex still have to " pay " for it in increased library size.
For this reason these sorts of add-ons are typically placed in their own namespaces and objects.
The downside to this approach is that the new functionality is no longer a part of string ; instead, it is isolated in its own set of functions that have to be called separately.
Instead of, which would be the natural organization from an OO point of view, you use something like, which effectively reverses the ordering.

2.201 seconds.