Adding static typing to Python

Bengt Richter bokr at oz.net
Tue Feb 19 20:45:46 EST 2002


On Tue, 19 Feb 2002 11:08:05 -0600, "Jason Orendorff" <jason at jorendorff.com> wrote:

>Courageous wrote:
>> Speaking of typedef and the C/C++ languages, I've long thought
>> that in a statically-typed language, the types should never be
>> aliased, and should always be distinct.
>
>I agree, for your example; but a common use of typedefs now is
>to create an alias for a type whose name is just too long to be
>allowed.
>
>  typedef list<pair<string, bool> >::iterator ItemIter;
>
I've wondered why they don't just automatically hash those monster unwieldy
names with md5 and convert the 128-bit digest to 24 characters all alpha as
an automatic alias. The originals could be kept in a special dictionary keyed by
the latter for whatever need. Or is that already being done in newer versions?

Regards,
Bengt Richter



More information about the Python-list mailing list