PEP 285: Adding a bool type

Jacob Hallen jacob at boris.cd.chalmers.se.cd.chalmers.se
Mon Apr 8 14:08:22 EDT 2002


In article <mailman.1018124969.17602.python-list at python.org>,
Ken Seehof <kseehof at neuralintegrator.com> wrote:
>> If we ignore the imaginary, which has a very specialized scope, we have 5
>> base types. These can interact in approximately 5! (120)
>> different ways in a
>> statement. If we add one more base type we get 6! (720) different ways
>> that our types can interact.
>
>In python the number of numeric interactions is essentially 3!, not 6!.
>Most of these interactions are trivial and predictable, and are not
>increased
>by bool.  My brain hurts trying to figure out how to enumerate the 6! that
>you suggest :-)  Perhaps in other languages your argument has merit.
>
>One thing that I agree with is that one would not be likely to add a bool to
>a complex number.  :-)

The difficulty does not come from the legitimate combinations. It comes from
the erroneous ones. Understanding what a correct program does is trivial,
compared to understanding why an incorrect one does not work.
The possible number of ways of combining X types is the factorial of X.

Each wrong combination requires the understanding of the error message and
the reason why it is wrong. A seasoned programmer can classify the errors
and handle a fair number of these classes. Newbies have a seriously
difficult time. I would even go as far as to say that it is the most
important factor controlling how much time a novice programmer needs
in order to be comfortable with the language.

Jacob Hallén

-- 



More information about the Python-list mailing list