Python from Wise Guy's Viewpoint

prunesquallor at comcast.net prunesquallor at comcast.net
Sat Nov 1 06:59:08 EST 2003


Ed Avis <ed at membled.com> writes:

> prunesquallor at comcast.net writes:
>
>>What would you like to call those `syntactic constructs' that do not
>>currently type check in Haskell, yet *may* belong to a class of
>>syntactic constructs that *could* conceivably be type checked in a
>>successor to Haskell that has a better type inferencing engine?
>
> Well of course, if you program in a different language you'd need a
> different type checking system.

Obviously.

But let us suppose that someone improved the type system of Haskell
such that some useful complicated constructs that did not pass the
type checker were now able to be verified as correct.  Didn't this
happen when Haskell was extended with second-order polymorphic types?
(when the restriction on forall was lifted?)

You could say that lifting this restriction created a `new' language
and refuse to admit the notion that two are related, or you might take
the viewpoint that some programs that were invalid before are now
valid.  The former point becomes rather strained if you have some sort
of switch on the implementation.  

For instance, OCaml allows recursive function types if you specify
that you want them.  Most people seem to view this as 

`OCaml with recursive function types'

instead of

`completely new language unrelated to OCaml, but sharing the exact
same syntax in all places except for declaration of recursive function
types.'

And most people seem to think that my `black hole' `syntactic
construct', which does not type check under OCaml without the flag,
but *does* under OCaml with the flag, can be unambiguously called a
`program'.






More information about the Python-list mailing list