Peter B. West wrote:
>  > a more iterator like pattern:
>  >        while (hasNextLM()) {
>  >            curLM = nextLM();
...
> the first idiom is actually easier to follow.  I suppose you could say,
> if you needed such a crutch, that it was a pattern.

The problem is, the Java libraries use the second pattern.
It's not good to use different patterns for the same thing.

>  >   Don't mix underscores with camelCase.
> It comes down to "ugliness", doesn't it?  "camelCase" is nice.  I
> haven't heard it before, and I agree with your admonition.

Uglyness is certainly a factor, but my writing habits,
or perhaps being to lazy to properly configure my
default editor, and my keyboard layout causes some
more problems too:
- I hate prefixes which are shared by a lot of
   identifiers
- I hate underscores in general

For the Heathens and the Users Of Inferior Tools out there,
Emacs provides a dynamic completion function for identifiers.
Type in " s u b s <F11>" (or whatever key is used to invoke
the function), and the editor searches the file and will perhaps
present you "subSequenceSpecifier". Repeatedly pressing the
autocompletion key will present other possible completions.

Obviously this is the reason why I have no fear of long
identifiers, and in fact I *like* them, because random abbrvs
can introduce subtle differences which can be overlooked during
autocompletion.

Another effect is, if there are more than a few identifiers
in the file (or other files as they are searched too) which
share a common prefix, I have to type the prefix *and* a few
more characters to get the correct completion after the first
or at least after the second hit. That's why I'm not very fond
of prefixes, the longer the worse, and any rules which encode
whatever common information in prefixes.

Using underscores in the prefix or to separate the prefix from
the real identifier makes it worse again. Obviously, I have to
key in the prefix and the underscore, which presents a few
interesting problems, in particular if the identifier is
camelCased. Keying in the underscore requires using the shift
key. If I miss this due to hasty typing, I get a dash, and the
completion won't complete. If I press the shift key too long,
the character after the underscore is capitalized, which
causes the completion algorithm to be case sensitive, and again
there is no match. Without the underscore, i never bother with
the shift key, because then the completion algorithm is case
insensitive and will even capitalize lower case characters
already typed in if necessary.
(note that this is not all that much a problem with the C
words_separated_by_underscores style, as I can often invoke
the completion successfully before an underscore has to be
typed).

As I already noted, this can be fixed, and perhaps enhanced
to provide an even more intelligent completion algorithm, but
I'd rather think I'd take advantage of other people's dislikes
and get rules which will be ignored sooner or later anyway
canned before too much efford is wasted to introduce and
enforce them.

Does this explain and help to understand my position?

J.Pietschmann


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to