John Nagle wrote:
   Pascal got this right.  (A nice feature of Pascal
was that "packed array of boolean" was a bit array).
C, which originally lacked a "bool" type, got it wrong.
So did Python.

If Python had had a boolean type from the beginning, it
probably wouldn't have been a subclass of int -- that was
more or less forced by backwards compatibility issues.

Java is in the middle, with an isolated
"boolean" type but a system that allows casts.

I'm not sure that's all that much different from Pascal,
where you can use ord() to turn a boolean into an int
if you want to. At least you're being explicit.

--
Greg
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to