Python from Wise Guy's Viewpoint
ketil+news at ii.uib.no
ketil+news at ii.uib.no
Tue Oct 28 05:20:45 EST 2003
Matthew Danish <mdanish at andrew.cmu.edu> writes:
> On Mon, Oct 27, 2003 at 10:08:15PM +0100, Joachim Durchholz wrote:
>> Matthew Danish wrote:
>>>On Mon, Oct 27, 2003 at 07:00:01PM +0100, Andreas Rossberg wrote:
>>>>Pascal Costanza wrote:
>>>>> Can you show me an example of a program that does't make sense anymore
>>>>> when you strip off the static type information?
>>>> Here is a very trivial example, in SML:
>>>>
>>>> 20 * 30
>> No, the correct answer isn't 600 in all cases.
> What is this stuff? I am talking about integers here!
But the SML program isn't. Or it may be, and maybe not. So it's
ambigous without type information.
> Why can't the implementation figure out how to represent them most
> efficiently?
Because it needs a type annotation or inference to decide that the
numbers are indeed integers, and not a different set with different
arithmetic properties.
> Lisp gets exact rational arithmetic right, why don't ML or Haskell?
Could you point to a case where they don't? I don't understand your
criticism at all. Is the ability to do modulo arithmetic "wrong"?
-kzm
--
If I haven't seen further, it is by standing in the footprints of giants
More information about the Python-list
mailing list