Re: Javascript: Time Traveller From the Year 1962!

[prev] [thread] [next] [lurker] [Date index for 2005/04/10]

From: peter (Peter da Silva)
Subject: Re: Javascript: Time Traveller From the Year 1962!
Date: 02:01 on 10 Apr 2005
> Something I forgot... preprocessing IS part of the C language.

The C language that didn't have I/O, well, you know, it didn't have
a standard either, and there were two preprocessors (CPP and M4).

Speaking of I/O...

The "non-hosted" standard for embedded C, which more closely matches
the JS environment, has no I/O either.

Languages designed for embedding are *different*. And, no, Perl isn't one
of them.

> This means that *locally* I can slap together whatever pre-processor include
> system I want for Javascript and use it but I cannot ship code which uses it
> because it won't run anywhere else.

Your Javascript code won't run anywhere else anyway, because you
need a lot more infrastructure than in "include" statement to
support libraries.

> Its not standardized.  I have to ship
> the post-processed spaghetti.  And if anyone's ever looked at post-processed
> C code from even a simple program... eww.

An include processor is NOT the same as cpp. It can be as simple as an awk
script. I wrote the second version of the INSMOD processor at Ferranti in
Fortran.

> Not getting any useful patches
> against that.  You can't ship nice, neat, reusable modules.  You can't have 
> a CJSAN.  Modular programming is crippled.

The kind of "modular programming" you're talking about depends on a hosting
environment that supports it, and Javascript doesn't have that by itself,
and *can't* have that in a portable fashion by itself, because it's different
for every server and every site. Your options are:

1. Put all the include files in the same directory. No CJSAN there.
2. Dictate the structure of the website.
3. Ship a build script that does the work you need, with Makefile
   variables (or equivalent) that specify the structure... and once
   you've done that you can ship the preprocessor as well.

> How far would C have gotten if #include was not standardized?

#include wasn't standardised. On VMS it was "#include stdio". The Allman
compiler built CPP into pass 1. Exec/8 file names couldn't use ".", that
was used to separate the file (directory) from the element (file).

> A defacto standard would have emerged PDQ.

I was #ifdefing around VMS include syntax in 1984.

You'd be AMAZED how hateful things have been in the past.

There's stuff above here

Generated at 12:00 on 12 Apr 2005 by mariachi 0.52