develooper Front page | perl.perl6.language | Postings from January 2002

Apocalypse 4 : The Strange Case of the STRANGE CASE

Thread Next
From:
Andy Wardley
Date:
January 23, 2002 02:38
Subject:
Apocalypse 4 : The Strange Case of the STRANGE CASE
Message ID:
20020122174047.M35211@dog.ourshack.com
I was reading Apocalypse 4 and was perturbed by the strange and inconsistent
looking use of UPPER and lower case in various keywords.

Now before anyone rushes to assist me in understanding the logic, I should
say that we've already thrashed this out on the London.pm mailing list and
several people (Hi Piers :-) have re-iterated the reasoning being the use
of upper vs lower case.

In a nutshell, UPPER CASE is reserved for special Perl blocks that should
stand out to the user due to the fact that they represent exception flow
control.

It's a good, logical and consistent argument for sure, but sorry, I don't 
buy it.  We end up with peculiarities like 'try/CATCH'.  Even if 'try'
is a keyword and 'CATCH' is a special block, I can't see any valid reason
for having them different case.  Same with 'last/NEXT' - they're so similar
in concept that the implementation details should not matter.

By this argument, I could claim that the correct capitalisation of "knife
and FORK" is based on the rule "cutting things are in lower case, spiking
things are in UPPER CASE".  It's consistent and logical, but common sense
should tell you that it's plain wrong.

INIT, DESTROY, AUTOLOAD, etc., all make sense to me.  They really are
special blocks that normally only occur once in a file.  But CATCH and 
NEXT are part of normal syntax.  I don't think they're any more "unusual"
in their flow control than try, while, loop or foreach.

I think this needs a rethink.  What do other people think?

A



Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About