Lazy developers, Stack concept, and the fastest, unobtrusive, JavaScript StringBuilder
Fast Web, and lazy developers About 1 month ago, I have posted a little piece of code that, in some way, could be a little revolution for JavaScript 3rd edition, and every kind of library. I explained how to use native Array methods with an object, to extend Array itself, or simply create a Stack behaviour, compatible with every used browser. Few comments a part, in both Ajaxian and this site, it seems that nobody had enough fantasy to use that tricky piece of code to create every kind of Stack based constructor, library, or Iterator, without destroying the native Array.prototype. So, here I am, with another little piece of code that uses the same Stack concept to create a StringBuilder constructor. The Fastest Unobtrusive JavaScript StringBuilder A common problem with JavaScript and, specially, Internet Explorer, is string concatenation. You can find every kind of benchmark, even in IEBlog , about string concatenation problems. IE Team seems to suggest the usage of an Array, becaus...