scripting languages

Aaron Toponce aaron.toponce at
Tue Nov 9 06:24:06 MST 2010

On Tue, Nov 09, 2010 at 03:29:53AM -0700, Levi Pearson wrote:
> Brendan Eich and the supporters of the JavaScript (initially called
> LiveScript) at Netscape were big fans of Scheme, which is actually how
> they lured Eich in to work on it.  This is why it manages to be a
> pretty decent language despite being hampered with the Java-like
> syntax and years of terrible implementations in web browsers.
> However, there was too much time pressure and orders to look like Java
> that made for some less-than-desirable decisions.  See here for a
> discussion of some of the stupid:
> However, despite being designed to do browser stuff, the language
> itself isn't tied to web-specific things.  This isn't like PHP, where
> the designers had no idea what they were doing and just hacked stuff
> together until it kind of did what they wanted.  Eich had read SICP,
> which should (or a suitable substitute, such as CTM) be required
> reading for anyone thinking of designing a programming language these
> days.  The intersection of the anonymous function closures (from
> Scheme/Lisp) and prototype-based OO features (from Self) pretty much
> out him as a programming language nerd.
> Javascript is different from all of the above in that it's
> prototype-based, which means that you don't have the usual notions of
> object class and inheritance.  Instead you can clone objects, and you
> can set a 'prototype' reference on the object that points to an object
> to look at for properties that are not defined on the object itself.
> As you can see, you have the building blocks necessary to create a
> system of class-based inheritance if you want, but you can also create
> other things with those blocks as well.  This does give you some extra
> avenues for expressing ideas in code, and it's probably what the
> quoted person was referring to.

Okay. Fair enough. I'll give credit where credit is due. I knew
Javascript was prototype-based, and I have had good experiences with its
objects when designing various web pages in the past. Even with node.js,
I had no idea that it could stand on its own as a capable scripting
language for Unix system administration. Maybe I'll look at it just for
kicks and get a feel for it myself.

> None of this really has any relevance to scripting, though, except to
> note that trying to model a unix script as an object-oriented program
> could very well be counterproductive, as there's a fairly serious
> impedance mismatch.  Unix is (traditionally, anyway) all about
> processes communicating via streams of text, while most OO languages
> are about program parts accessing one another via discrete messages;
> i.e. function calls with fancy inheritable namespaces and some
> polymorphism.

As previously mentioned, I don't know if I would recommend Javascript as
a sysadmins scripting language of choice. In my professional
experience, most sysadmins barely know enough Bourne shell to "get by".
Less common are those that are proficient with shell scripting, and even
more rare are those who know another language like Perl or Python. So,
recommending Javascript seems like the wrong choice, if future
maintainability of your scripts are important.

But, then again, it's writing crazy code in a language that no one can
support but yourself that might make you valuable to the company. You
might be able to use that as a means of getting the salary you're after.

. o .   o . o   . . o   o . .   . o .
. . o   . o o   o . o   . o o   . . o
o o o   . o .   . o o   o o .   o o o
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 527 bytes
Desc: Digital signature
Url : 

More information about the PLUG mailing list