On Dec 17, 2006, at 12:32 PM, A. Pagaltzis wrote:
* Peter da Silva <[email protected]> [2006-12-17 19:05]:
On Dec 17, 2006, at 11:08 AM, A. Pagaltzis wrote:
Agreed. After all, it's roughly a cross between Self and
Perl...
It's more like a C-styled version of Self, without the
Smalltalk/Self dependance on the GUI and snapshots. What of
Perl has seeped into it has largely been the stuff that Perl
borrowed from languages that sucked less in the first place.
Objects in JS are synonymous with hash maps and vice versa.
Hash maps are a particular implementation of tagged collections. Twenty
years ago I'd have called them property lists, because that's what
they're called in Lisp 1.5. There have been object systems based on
property lists at least that long... "hash maps" is jargon, an
implementation detail that shouldn't be exposed in the language.
In Self, there is a meta-object protocol; JS doesn't have that.
That's where Self has this dependance on the GUI and snapshots, it's
reluctant to let go the class model from Smalltalk. Early Self was
actually more template-like, but they've deprecated creating new
methods in the language rather than through the GUI even though they
admit it makes things simpler.
You might contend that these things come from where Perl borrowed
them, fine;
I didn't contend that at all, rather I said that the good parts of Perl
that have seeped into Javascript are primarily the things that Perl
borrowed from other languages.
esp. considering Javascript was conceived
for the browser environment at a time when doing dynamic web
content meant doing Perl, period.
There was no such time. By the time even the early web came along there
were hundreds of good scripting languages already in wide use. People
writing dynamic web scripts in Perl are, and always have been, doing so
because they preferred to work in Perl. Not because there was any
reason other languages were any less well suited to the web.