On Wed, Apr 25, 2001 at 12:36:33AM -0500, David L. Nicol wrote:
> 
> Ah.. I knew I'd find the thread in here somewhere.
> 
> The problems go away if you allow white space to signify.
> 
> 
> > [...]  Consider....
> > 
> >         print "Foo"
> >         foo("bar");
> > 
> > Did the author forget a semi-colon, or did they intend to concatinate
> > there?  Also, consider this...
> they forgot a semicolon.  A spaceless juxtaposed concat would look like
> 
>          print "Foo"foo("bar");

Ick, please no.  One of the things I like about Perl, as opposed to
Java say, is that a newline is almost never considered a statement
terminator.  In Java (and probably a bunch of other languages), to
write a long string you need to do the equivalent of...

        $foo = 'some stuff \
        some more stuff \
        and more stuff';

That or a bunch of concatinations.  In Perl we don't have this problem
(we also have here-docs YAY!)  This is very common in any code that
involves alot of embedded text (such as SQL or HTML).

The solution to the lack of a semi-colon dangerously stretches this
nice feature of Perl.

It also looks like a smashed jumble.  The eye trips on all those
quotes without any distinguishing whitespace or word breaks.

        print "Foo"foo('bar');

could easily be confused at first glance with

        print "Foo foo('bar')";

the eye has alot of trouble distinguishing the two.


I think Nat said it best in his "What's Up With Those Python Fucks
Anyway" talk.  Whitespace (or lack thereof) as syntax misses the key
point about whitespace in code.  Its used to disambiguate and clarify.
Hijacking it as syntax means it can no longer be used as such.


-- 

Michael G. Schwern   <[EMAIL PROTECTED]>    http://www.pobox.com/~schwern/
Perl6 Quality Assurance     <[EMAIL PROTECTED]>       Kwalitee Is Job One
Ooops, fatal mutation in the test script.

Reply via email to