# [plt-scheme] Re: Typed Scheme: Is there any easy way around this?

On 6/1/07, Matthew D Swank <akopa.gmane.poster at gmail.com> wrote:
>* Matthias Felleisen <matthias at ...> writes:
*>*
*>* >
*>* > We have chosen the traditional notation intentionally. Your proposal
*>* > doesn't reduce the number of parentheses nor the number of chars I
*>* > have to type, right?
*>* >
*>* > And before we get more email on this: keep in mind that I have worked
*>* > with two people who did Hindley-Milner inference for types in Scheme,
*>* > with two people who did SBA inference for Scheme, and now it's
*>* > explicitly, statically typed. Period. Until further notice.
*>* >
*>* > -- Matthias
*>* >
*>*
*>* Was there a prior discussion about this online (I can't seem to find one.)?
*>* What about the type system makes it hard to support inference?
*
Type inference is a hard problem in general for languages with
subtyping, and the addition of the additional features in Typed Scheme
makes it harder.
It's possible that inference is easy for Typed Scheme, but I doubt it,
and it's an open research problem for the moment.
Further, as Matthias said, we don't currently plan to tackle this
problem in the near future - I think Java et al. have demonstrated
that type inference isn't necessary for readable code.
Of course, there are places where Typed Scheme places too much
notational burden on programmers, and we'd like to address that,
independent of inference. If you have specific examples of verbosity
that you'd like considered, please let me know.
Finally, there is one place where we support (a very little bit of)
inference. If you write a non-recursive binding either let or
internal define, then you can leave of the type annotation, like so:
(let ([x 1])
(define y 2)
(+ x y))
and everything typechecks.
Thanks,
--
sam th
samth at ccs.neu.edu