Style and progress

TorgoX on 2005-03-19T07:03:14

Dear Log,

I often have the feeling that very little progress has been made on the Web since, say, 1997.

But all you have to do to dispell that idea is to look at JavaScript Application Cookbook (publication date listed as 1999, which means it was reflects the best practices of 1997).

It contains creaky old stuff like this:

// Define a function to perform the image rollovers
function imageSwap(imagePrefix, imageIndex, arrayIdx) {
    document[imagePrefix].src = eval(arrayHandles[arrayIdx] + "[" + imageIndex + "].src");
    }

// Define a function a generate the layers
function genLayer(sName, sLeft, sTop, sWdh, sHgt, sVis, copy) {
    if (NN) {
        document.writeln('' + copy + '');
        }
    else {
        document.writeln('
' + copy + '
' ); } }
...which is about the JavaScript stylistic equivalent of Perl code that starts out: require 'cgi-lib.pl'; &ReadParse(*in); ### READ FORM DATA ###

Progress has been made. I think part if it is that a great deal of Firefox is implemented in JavaScript. That forces a real sort of seriousness on the language. FINALLY! GYAAH!


History

merlyn on 2005-03-20T18:55:12

I once sat on a panel next to the inventor of JavaScript. There are many things he regrets about the language, not the least of which was the fact that he was forced to name it JavaScript.