Case sensitivity
Alex Martelli
aleax at aleax.it
Tue Feb 25 11:38:52 EST 2003
Terry Reedy wrote:
...
> I think there is a deeper wart in the name area: the exclusion of '-',
> the standard character in English for compound-word formation, as a
> legal name character. Its replacement in CS by '_' (shift-'-', ugh)
> or by mid-word capitalization (another shift, ugh) has always struck
> me as a priestly affectation. I consider this to be a subtle but real
> barrier to Computer Programming for Everybody.
<shrug> so use Cobol -- who's stopping you?
> Is it still possible to add '-' as a name (and re-word) character? Or
> does the implementation in C somehow prohibit this by requiring
> conformance to C's name rule?
Today, a-b does a subtraction between the value named by a and the
value named by b. If you want to turn that into a 3-character
identifier, and force subtraction to be spelled as "SUBTRACT b
FROM a", I _do_ suspect you'll be better off with Cobol, really.
Cobol DOES have some good points, but I don't think that such
verbosity in expressions is one (I know algebraic form is today
also generally permitted, but it was not allowed when I did a
little Cobol production coding years ago -- I don't recall if it
was the compiler, or a local coding standard, forbidding it).
If what you want is mandatory space between tokens, so a-b is a
name but a - b is a subtraction -- hmmm, Dylan has that, and it
kept tripping me up. I think it's a trap, an accident waiting to
happen, and overall a language defect, but I'll gladly listen to
Dylan fans explaining to me why that's not so.
Alex
More information about the Python-list
mailing list