"no variable or argument declarations are necessary."

Steve Holden steve at holdenweb.com
Fri Oct 7 03:47:47 EDT 2005


Antoon Pardon wrote:
> Op 2005-10-06, Diez B. Roggisch schreef <deets at nospam.web.de>:
> 
>>>Suppose we have a typesystem which has the type ANY, which would mean
>>>such an object could be any type. You could then have homogenous lists
>>>in the sense that all elements should be of the same declared type and
>>>at the same time mix all kind of type in a particular list, just
>>>as python does.
>>
>>The you have JAVA Object or C void*. Which cause all kinds of runtime 
>>troubles.... because they essentially circumvene the typechecking!
> 
> 
> Why do you call this a JAVA Object or C void*? Why don't you call
> it a PYTHON object. It is this kind of reaction that IMO tells most
> opponents can't think outside the typesystems they have already
> seen and project the problems with those type systems on what
> would happen with python should it acquire a type system.
> 
[sigh]. No, it's just you being you. Diez' intention seemed fairly clear 
to me: he is pointing out that strongly-typed systems invariably fall 
back on generic declarations when they want to allow objects of any type 
(which, it seems to me, is what you were proposing as well).

In other words, you want Python to be strongly-typed, but sometimes you 
want to allow a reference to be to any object whatsoever. In which case 
you can't possibly do any sensible type-checking on it, so this new 
Python+ or whatever you want to call it will suffer from the same 
shortcomings that C++ and java do, which is to say type checking can't 
possibly do anything useful when the acceptable type of a reference is 
specified as ANY.

> 
>>>So how would this limit python.
>>
>>The limitation is that in static languages I must _know_ what type to 
>>cast such an ANY, before calling anything on it. Otherwise its useless.
>>
>>
>>>>even though ususally the contents of a list 
>>>>share some common behaviour. And that exactly is the key point here: in 
>>>>a statically typed world, that common behaviour must have been extracted 
>>>>and made explicit.
>>>
>>>
>>>Would my suggestion be classified as a statically typed world?
>>
>>See above.
> 
> 
> Your answer tells more about you then about my suggestion.
> 
Damn, I've been keeping away from this thread lest my exasperation lead 
me to inappropriate behaviour.

Is there any statement that you *won't* argue about?

leaving-the-(hopefully)-last-word-to-you-ly y'rs  - steve
-- 
Steve Holden       +44 150 684 7255  +1 800 494 3119
Holden Web LLC                     www.holdenweb.com
PyCon TX 2006                  www.python.org/pycon/




More information about the Python-list mailing list