Re: Python from Wise Guy's Viewpoint

From: Joe Marshall (jrm_at_ccs.neu.edu)
Date: 10/29/03


Date: Wed, 29 Oct 2003 13:01:12 -0500

Joachim Durchholz <joachim.durchholz@web.de> writes:

> Espen Vestre wrote:
>> Now you're conflating two readings of "want declarations" (i.e. "want
>> them whenever they're convenient for optimizing" vs. "want them
>> everywhere and always")
>
> Type inference is about "as much static checking as possible with as
> little annotations as absolutely necessary".
> HM typing is extremely far on the "few declarations" side: a handful
> even in large systems.

I certainly don't mind as much static checking as possible. I get a
little put off by *any* annotations that are *absolutely necessary*,
though. My preference is that all `lexically correct' code be
compilable, even if the object code ends up being the single
instruction `jmp error-handler'. Of course I'd like to get a
compilation warning in this case.

>
> It sounds unbelievable, but it really works.
>

I believe you. I have trouble swallowing claims like `It is never
wrong, always completes, and the resulting code never has a run-time
error.' or `You will never need to run the kind of code it doesn't allow.'



Relevant Pages

  • Re: Python from Wise Guys Viewpoint
    ... Joachim Durchholz writes: ... > Type inference is about "as much static checking as possible with as ... > little annotations as absolutely necessary". ... compilation warning in this case. ...
    (comp.lang.lisp)
  • Re: PyPy 1.0: JIT compilers for free and more
    ... can process these annotations? ... subset of Python *viewed* as static enough to be translatable to C ... (RPython is of course as polymorphic as any other Python code and can ... RPython is an approximation to Python on which static type inference ...
    (comp.lang.python)