Incomparable abominations
Jp Calderone
exarkun at intarweb.us
Mon Mar 24 00:24:32 EST 2003
On Sun, Mar 23, 2003 at 11:58:31PM -0500, Lulu of the Lotus-Eaters wrote:
> |> the relation "1j < 2j" is self-evident and natural.
>
> "John Roth" <johnroth at ameritech.net> wrote previously:
> |That is, however, a border case. Is 1+2j < 2+1j true or false?
>
> True that the latter case has no natural order. But the former case
> does. Likewise, I find this order natural:
>
> "A" < "B"
>
> And this order is completely arbitrary:
>
> u"A" < unicodedata.lookup('HEBREW LETTER ALEF')
>
> In what sense is the Roman alphabet "less than" the Hebrew alphabet?...
In the sense (of which I am certain you are aware) that letters in the
Roman alphabet have been assigned numeric values which are less than those
assigned to letters in the Hebrew alphabet; so dictates conventional
programming practices.
In the same way, conventional mathematical practices dictate that complex
numbers not be compared with < and >.
Is it unfortunate that following two separate conventions sometimes leads
to apparently (superficial) conflicting ideas and behaviors? Yes.
Is it inexplicable to people without a PhD in computer science? No.
Does it prevent us from writing useful programs? No.
Is it an unsurmountable flaw in the language? No.
> [snip]
>
> To paraphrase the Timbot, Python seems to be aiming for a "principle of
> maximum surprise!"
Just the opposite, imho.
Jp
--
Lowery's Law:
If it jams -- force it. If it breaks, it needed replacing anyway.
--
up 4 days, 1:59, 2 users, load average: 0.00, 0.02, 0.00
More information about the Python-list
mailing list