On Jan 4, 2008 1:55 AM, SJS <[EMAIL PROTECTED]> wrote:
> begin  quoting Chuck Esterbrook as of Fri, Jan 04, 2008 at 01:26:30AM -0800:
> > On Jan 2, 2008 11:07 AM, David Brown <[EMAIL PROTECTED]> wrote:
> [snip]
> > > Honestly, lack of proper indentation support would be enough to keep me
> > > from using a language.
> >
> > I'm counting keystrokes. In Python, I think the count is 3: Shift + :;
> > then Enter
>
> Do shifts really count as a separate keystroke, and not, say, half a
> keystroke?  (Or as two?)

Sure, I'll go with 2.5

> > In Cobra, it's 2: Enter Tab
>
> Why is this important?

It's only important in the context of any claim that Python can have
autoindentation whereas Cobra cannot. I never mention the fewer
keystrokes for blocks unless that comes up.

> Today I floated an assertion that if you can't save about six characters
> by shortening a variable name, you really ought to think twice about
> truncating a word or removing vowels to shorten a variable name.

I hate vowel removal. I typically use the whole name or the first syllable.

> [That is, "sen" is not an acceptable shortening of "sensor", and neither
> is "snsr", even for a local temporary variable.  But "s", oddly enough,
> probably would be, since it's a signficant savings, which is okay for
> a temporary variable.)]

Agreed.

> Hm... and don't you lose that keystroke savings by having stuff like
> "as" and "of" as keywords?  (If I'm reading the examples correctly,
> you use "i as int" instead of "int i", which is an additional 3
> keystrokes...

Yep, but I consider names to be really important and I prefer to have
them up front:

class Point

    var _x as int
    var _y as int

Also, if you use dynamic typing, like in Smalltalk or Python, you can
just leave them off:

class Point

    var _x
    var _y

> > True, but most of my conventions are conventional. Capped classes.
> > Lower case args. I admit I'm taking it further than most languages,
> > but that's the point: semi-normalized syntax.
>
> ...integer variables could start with i, j, k, or l ... ;-)

There's no Cobra error or warning for that one.  :-)

> > > English grammar is a terrible place to look for inspiration for a
> > > programming language.
>
> Worked for perl, didn't it? :)

For a time, but Python continues to rise while Perl continues to sink:
http://www.tiobe.com/tpci.htm

The major aspect of natural language syntax that I'm interested in is
the idea that semi-normalization eases communication. I'm not
interested in a programming language that looks like natural language.

> > Sure, but my point still stands even with the inconsistencies you
> > mentioned: We have lots of rules about English capitalization,
> > punctuation and so on that enable us to read a wide variety of texts.
> > I think the challenge here is that by the time people reach adulthood,
> > these rules are so ingrained that they're taken for granted. I don't
> > think people realize how much benefit they get from these rules.
>
> ...and how they can be broken for effect.
>
> I actually would be really okay with a compiler that *complained*
> about indentation inconsistencies.
>
> Honest!

???

Are you really Stuart?

-Chuck

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to