[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Macros and little languages




A correction:

Neel Krishnaswami writes:
> 
> Matthias Felleisen writes:
> > 
> > 2. If your library supports first-class functions, how do you
> > exploit and use the type information? How do you do separate type
> > checking? It is indeed similar to calling from language A to
> > language B but for an LL language (is this the ll1 mailing list?) 
> > it should be a "no overhead" operation to call between the two
> > parts of the language.
> 
> I think there are some realistic cases where it's possible to make the
> cross-over from the typed to the untyped world cheap.
                                   ^^^^^^^

This should be "dynamically typed", of course. Thanks to Shriram for
pointing out this slip -- a particularly embarrassing one to make give
who is on this list!

> In particular, if the language has multimethods, then you can catch
> all type errors using the multiple dispatch mechanism -- ie, when
> passed some arguments to a method, you can use the dispatch
> mechanism to identify the correct function body and raise
> "message-not-understood" if the arguments are ill-typed. Since the
> dynamic dispatch had to happen anyway, you've effectively wiped out
> the cost of dynamic typing.

-- 
Neel Krishnaswami
neelk@alum.mit.edu