3 ms·
One of the neat things about JavaScript is that objects are just hashes/dictionaries. It turned out to be a really flexible way to do objects. Unfortunately,
by koningrobot 18y ago
One of the neat things about JavaScript is that objects are just hashes/dictionaries. It turned out to be a really flexible way to do objects. Unfortunately, when you actually want to use an object as a dictionary, all the methods get in the way. If methods weren't owned by objects, there wouldn't be any such problem. A JavaScript with generic functions would be awesome.
I've been thinking of implementing such a thing (and a couple of other things to fix JavaScript), but it's sort of pointless, seeing as Common Lisp already does many things right. The only thing JavaScript has going for it is that it runs in browsers. A full-fledged interpreter (in JavaScript) for another language would be too slow. Perhaps such a language should be compiled down to JavaScript using only very simple and fast text transformations.
All this would be just for kicks, of course.