Python and generic programming
Roman Suzi
rnd at onego.ru
Fri Oct 22 01:25:49 EDT 2004
Sincerely yours, Roman A.Suzi
--
- Petrozavodsk - Karelia - Russia - mailto:rnd at onego.ru -
On Thu, 21 Oct 2004, Josiah Carlson wrote:
>
> > I wonder, does Python support generic programming paradigm, and to
> > what extent (I guess, it doesn't do it in full)? And (or) does it move
> > in that direction? Will we ever see
> >
> > concept WellAlright:
> > ...
> >
> > constructs in Python?
> > Isn't it right time to reserve "concept" as a keyword ;-)
>
>
> Perhaps you meant something different, but C++ style generic (template)
> programming is not necessary in Python.
Most Python programs are already kinda generic, yes. But generic
programming adds multi-sorted types control and constraints to ensure type
safety...
> With decorators, there is an easy method for generating per-argument
> type checking and dispatch for functions and methods.
>
> As Python does runtime type checking, if you care to support different
> types of arguments even without decorators, one is able.
>
> - Josiah
>
More information about the Python-list
mailing list