3 ms·
Yeah, I don't get the recent Javascript love-fest when Python and Ruby (heck, even Perl) are tremendously superior. Mainly due to lacking insane design decision
by orangecat 17y ago
Yeah, I don't get the recent Javascript love-fest when Python and Ruby (heck, even Perl) are tremendously superior. Mainly due to lacking insane design decisions like default global scope and having standard libraries that are actually useful. I mean, did it not occur to anyone that a language heavily used for processing user input might benefit from String.trim? And you'd think a language built on key-value pairs would come with a hashtable object.
Yes I'm probably ranting; I've spent a large portion of the last 12 hours writing a bunch of Javascript that I really shouldn't have had to.
- util 17y agoDon't objects function as hashtables? var v = {"a": 1};
- arethuza 17y agoI think the only real restriction is that you can't use arbitrary objects as keys - only strings or things that easily convert to strings (such as numbers). See: http://ajaxian.com/archives/true-javascript-hash-table http://ajaxian.com/archives/true-javascript-hash-table Personally, I've never really regarded this as much of a problem.