Python's idiom for function overloads

Jacek Generowicz jacek.generowicz at cern.ch
Tue Feb 1 06:22:42 EST 2005


Philippe Fremy <phil at freehackers.org> writes:

> Enforcing types also brings the benefit that the program is more
> deterministic. In my experience, there is a lot more benefits to have
> an object whose type is clearly identified than to have function that
> accepts generic objects.
> 
> 
> I would go as far as saying that variables should have immutable
> types.

If you really believe this, then I would go as far as saying that you
would be happier in a language other than Python.

> It is more restricting that what python provides currently, but
> leads to clearer programming practice: the intent of the developer
> shows up in the type he uses.

Not in my opinion or experience.

To each his own, and vice versa.



More information about the Python-list mailing list