3 ms·
Couldnt we just have an object called String2 with a replace method that replaces all occurances without any regex at all? Like in any other language? We could
by tomaszs 7y ago
Couldnt we just have an object called String2 with a replace method that replaces all occurances without any regex at all? Like in any other language? We could fix entire Javascript just by adding two to all object names.
- colejohnson66 7y agoThis isn’t String.replaceAll(str, match, replace), it’s str.replaceAll(match, replace). A function of the type, not a class.
- soylentgraham 7y agoThis is such a terrible idea.
- tomaszs 7y agoYou right. We should have Javascript2 language.
- herohamp 7y agohttps://xkcd.com/927/ https://xkcd.com/927/
- tomaszs 7y agoThis strip is about creating unifications based on two things that are not standarized. While the idea is to make a new JS branch that will solve issues gathered through years. So the strip does not apply here. Also, while it has some point with extreme unification efforts, there is a vast range of unification projects that actually delivered what they promised to.