|
Posted by Tim Hunt on 12/17/12 11:54
Tony Marston wrote:
> "Kevin Andreoli" <I.post.and@you.post.the.reply.invalid> wrote in message
> news:eaoppr.3k0.1@andreoli.co.uk...
> > On Tue, 1 Aug 2006 09:58:50 +0100, in article
> > <ean53g$rlk$3$8300dec7@news.demon.co.uk>, I
> > saw that Tony Marston wrote...
> >
> >
> > |
> > |I prefer the PHP way. I have no problem with using foo, $foo, foo() and
> > |$object->foo() to differentiate between constants, variables, functions
> > and
> > |methods. In fact the language which I used for 12 years before PHP used
> > |$$foo for global variables and $foo$ for local variables. The fact that
> > it
> > |involves typing in a few more characters is totally irrelevant. It makes
> > it
> > |easy to read, and it is much more important that code be readable by
> > humans
> > |than by a computer.
> > |
> > |
> > Having read all of this thread so far, I feel it is time to add my
> > twopennyworth. (Two
> > Cents for those across the pond.)
> >
> > After 30+ years of writing code (never COBOL thankfully) I was, until
> > recently, anti
> > case-insensitivity. Now I find I don't care much as I just follow
> > conventions as
> > required by my employer's coding standards.
> >
> > What I do care about, and have always rejected in anyone who works/worked
> > for/with me is
> > the idea that ANYONE would use the same name for different entities in the
> > same program.
> > Anyone who used foo, $foo, foo() etc. or ThisTHING thisthing ... in a
> > program would be
> > reeducated quickly, using any necessary size of clue-stick. No matter
> > what the case
> > convention I would NEVER expect to see two entities using the same name!
>
> My point exactly. That is why I prefer languages which makes such a thing an
> impossibility.
>
> --
Fair point, personally I prefer languages which make blocks of code
like the stuff on the pages below impossible.
http://www.helsinki.fi/atk/unix/dec_manuals/cobv27ua/cobum_039.htm
http://www.angelfire.com/tx4/cus/shapes/cobol.html
http://www.csis.ul.ie/COBOL/Exercises/Exm-RoyaltyPaymentsRpt/Prg-LibRoyaltyRpt.htm
MY BIG PROBLEM IS THAT CASE INSENSITIVE LANGUAGES SEEMS TO ENCOURAGE
PEOPLE TO PRESS THE CAPS LOCK KEY ONCE THEN START TYPING OUT BIG BLOCKS
OF CODE IN ALL CAPITALS. THIS MAKES THE CODE HARDER TO READ THAN IT
SHOULD BE. IT SEEMS YOU HAVE TO READ MOST EVERYTHING SLOWLY AND
CAREFULLY TO MAKE SURE THAT EVERYTHING IS CLEAR. ITS ONE OF THE MAIN
REASONS I LIKE THE C BASED LANGUAGES.
Clearer now...Its something that can only happen in case insensitive
languages and its a habit that seems way too common.
TIM HUNT
Navigation:
[Reply to this message]
|