4 ms·
As long as Python actively refuses to support real constants among some other immutability related features, I think the more recent versions of JS are going to
by pvdebbe 10y ago
As long as Python actively refuses to support real constants among some other immutability related features, I think the more recent versions of JS are going to get past Python in sheer elegance of code.
- tracker1 10y agoI'm inclined to agree to some extent... I think that JS can be beautiful and intuitive. However, I've seen too many instances of the following. var bazCopy = []; for (var i=0; i<bar.baz.length; i++) { var orig = bar.baz[i]; bazCopy[i] = { fizz: orig.fiz, buzz: orig.buzz }; } parentCopy.baz = bazCopy; Over map/reduce/filter, and the like... Sometimes doing code reviews on pull requests is exhausting.