[plt-scheme] Compiler optimizes Typed Scheme?!?
On 2/26/07, Sam TH <samth at ccs.neu.edu> wrote:
> On 2/26/07, Paulo J. Matos <pocm at soton.ac.uk> wrote:
> > On 2/26/07, Sam TH <samth at ccs.neu.edu> wrote:
> > > Typed Scheme is implemented using the MzScheme module/syntax system.
> > > Therefore, it performs static, ahead-of-time checks, not runtime
> > > assertions. However, currently all types are macro-expanded away
> > > before compilation.
> >
> > I'm not sure if 'all types are macro-expanded away before compilation'
> > implies that there is no runtime performance penalty. Is there?
>
> The only residue of the types are literal constants and syntax
> properties. My understanding of the MzScheme compiler is that these
> are removed before runtime, so there should be no change in runtime
> behavior for a Typed Scheme program.
>
Nice!
> A program that uses Typed Scheme as part of a larger project, using
> the ability of Typed Scheme to interoperate with other PLT Scheme
> code, will incur the runtime overhead of contracts at the boundary
> between typed and untyped code.
>
I'm sorry, now you lost me. When are those contracts enforced? How
does typed scheme know the boundary between typed and untyped scheme?
[ reading the manual more closely ]
Humm, maybe I understand. You can't just mix typed and untyped scheme
in the same module, can you?
If your answer is that I can't, then you can forget my initial question. :)
Moreover, is there any printable version of the typed scheme manual?
Cheers,
Paulo Matos
> --
> sam th
> samth at ccs.neu.edu
>
>
>
--
Paulo Jorge Matos - pocm at soton.ac.uk
http://www.personal.soton.ac.uk/pocm
PhD Student @ ECS
University of Southampton, UK