Gene said:
Arved Sandstrom wrote:
[snip]
I'm with Arne on this one. I expect programmers using a language to at
least thoroughly understand the datatypes for a language. Granted,
leading zeros are a pretty crappy prefix choice, which is why a lot of
languages use something else, but a diligent _learning_programmer should
have discovered this crappy choice when reading about literals.
Odd. You are agreeing with ME.
Then you and Arne are in agreement.
Leading zeroes to represent octal values weren't added to the C language family
"without notice" at all, but with abundant notice. Arne is simply
saying that one must learn the programming language if one wishes to
use it. This includes reading the documentation, wherein such notice
is offered.
Not abundant notice if it has been missed by so many. It is a
violation of the Law of Least Astonishment.
Computer programming uses all sorts of terms and notations in ways different
from ordinary usage ("method", "call", "object", "integer", "%",
"@"). It is incumbent upon one learning a programming language to
learn the specific semantics and syntax, and complaints that it is
unlike other languages (programming or otherwise) are feckless.
Quite true. Learning those terms is part of the basics of
programming. How a particular language does something is not.
If I were to create a programming language, it would be
reasonable for me to expect that people would know what "method",
"call", etc. mean. It would not be so for something idiosyncratic to
my language.
If I were considering breaking with general practice on
something, perhaps, I should reconsider or document it very well.
At various times, I have had (and continue to have) considerable
difficulties with various features of various programming languages,
not because any given feature is all that difficult, but because of
the difficulty, if not impossibility, of getting a clear statement of
how the feature works. You know that programmers tend to not like
documenting, right?
I wind up having to guess, document the results, refine, and
repeat. This is very slow.
Gratuitous changing of behaviour is a gotcha. Gotchas waste
time.
Sincerely,
Gene Wirchenko