I always wonder when it comes to mutability. Why .net designers have developed only stringbuilder class to achieve mutability of string class & not intbuilder for int considering int & string are implemented exactly the same way irrespective of their data types.
Many other languages provide similar design for strings: Java with StringBuffer and StringBuilder, Scala with StringBuilder, Python with MutableString though there are other, beter solutions in Python. In C++ strings are mutable, so no need for a builder.
The reason why builder exist for strings is:
The reason why builder doesn't exist for int:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With