Case-sensitivity: why -- or why not? (was Re: Damnation!)
Gareth McCaughan
Gareth.McCaughan at pobox.com
Sun May 21 19:05:46 EDT 2000
Tim Peters wrote:
> I haven't used Alice. The counter-argument I've heard from some who have is
> that this was much more a problem with Alice than with Python, in that Alice
> exposed various predefined modules and classes with LongAttributeNames but
> in a variety of distinct styles: case-sensitivity hurt because the graphics
> methods used case inconsistently in their names, and nobody could keep all
> its idiosyncracies straight. With benefit of full ignorance, I have to say
> that sounds more plausible to me than that humans are baffled by
> *consistent* use of mixed case. you find this sentence *inherently*
> jarring; i do too <wink>.
>
>> ...
>> I am a very case-sensitive person myself: ...
>
> DITTO. Tools to help people get the case straight will be wonderful, but to
> the extent that case-insensitivity is an extraordinary claim, let's demand
> extraordinary evidence before building it into the language. Didn't the ABC
> project run usability studies on this aspect too? IIRC, ABC was also
> case-sensitive.
I very much agree with all this.
>> (The number two problem was 1/2 == 0; there was no
>> significalt number three problem.)
>
> I'm wholly comfortable with 1/2 == 0 myself, but am equally comfortable with
> rationals, floats, constructives or BCD, and can easily see why 1/2 == 0 is
> a bad idea for computer newbies (more, it seems a bad idea for just about
> everyone except system programmers -- which we both were when this decision
> was made). So I'm not just flaming Randy <wink>.
Here's a half-baked suggestion.
Give Python rational numbers of two flavours: with long
integers and with short (machine) integers. Make overflow
on "short rationals" produce floats rather than "long
rationals". Then:
- 1/2 = (surprise, surprise) 1/2.
- Doing lots of arithmetic using integers carelessly
can't slow you down by an unbounded amount.
- No one is going to be desperately surprised if
adding two very large fractions yields a float.
- We have proper rational numbers available for those
who want them.
Of course, this doesn't fit well with something else I'd
suggest for Py3k (namely: make overflowing short integers
silently become long integers). Too bad.
--
Gareth McCaughan Gareth.McCaughan at pobox.com
sig under construction
More information about the Python-list
mailing list