Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

TorgoX (1933)

TorgoX
  sburkeNO@SPAMcpan.org
http://search.cpan.org/~sburke/

"Il est beau comme la retractilité des serres des oiseaux rapaces [...] et surtout, comme la rencontre fortuite sur une table de dissection d'une machine à coudre et d'un parapluie !" -- Lautréamont

Journal of TorgoX (1933)

Saturday March 19, 2005
02:03 AM

Style and progress

[ #23733 ]
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('<LAYER NAME="' + sName + '" LEFT=' + sLeft + ' TOP=' + sTop +
        ' WIDTH=' + sWdh + ' HEIGHT=' + sHgt + ' VISIBILITY="' + sVis + '"' +
        ' z-Index=' + zIdx + '>' + copy + '</LAYER>');
        }
    else {
        document.writeln('<DIV ID="' + sName + '" STYLE="position:absolute; overflow:none; left:' +
            sLeft + 'px; top:' + sTop + 'px; width:' + sWdh + 'px; height:' + sHgt + 'px;' +
            ' visibility:' + sVis + '; z-Index=' + (++zIdx) + '">' +
            copy + '</DIV>'
            );
        }
    }

...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!

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • 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.
    --
    • Randal L. Schwartz
    • Stonehenge