Web weirdness

Daniel Barlow dan at coruskate.net
Wed Jul 4 22:01:05 BST 2007


Abigail wrote:
> On Wed, Jun 20, 2007 at 01:34:32PM +0100, David Cantrell wrote:
>> &image=... != ℑ

I just spent several seconds of my life trying to parse that in C.  Ouch

> And 
> 
>   do {print "foo"}  !=  do {print "foo";}
> 
> yet, semantically, they are identical. In Perl, the semi-colon terminating
> the statement is optional if Perl can deduce from what follows where the
> statement ends. Same in HTML.

I don't have a Perl grammar to hand (if indeed such a thing exists) and 
it may well use some kind of evil heuristic to parse this, but I note 
that you could achieve the same effect by specifying ';' as a statement 
*separator* instead of a *terminator*.  Which I think is what Pascal does.

> The choice of & to separate CGI parameters (which in themselves are a
> minilanguage inside URLs) was a pretty poor one considering the role of
> & in HTML documents.

I suspect that the people who originally designed CGI were mostly 
unaware of SGML.  (I have vague memories that early versions of HTML 
were not SGML applications anyway, BICBW)

Nevertheless it was still a pretty dumb choice given its use in the unix 
shell.  OK, ; is not much better from that perspective either


-dan


More information about the london.pm mailing list