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

RE: the forward method [dynamic vs. static typing]

Steve Dekorte wrote:
> Ok, now:
> 1. forwarding is a very flexible and powerful mechanism

For what purposes?  You haven't made any case for it yet.

> 2. you agree that a type system is useless with forwarding

I wouldn't assume that.  For a start, that would make Io useless, since it
has a type system and presumably supports forwarding.

But if you're talking about static type checking, it's possible to have
certain kinds of objects which support forwarding and others which don't.
In previous posts, I described approaches in languages like C++ that
actually do that sort of thing in practice.

In a higher-level language than C++, static type analysis could be used to
detect messages that are likely to need to be handled by forwarding, and an
IDE could flag them as such, perhaps with a color.  For example, the
DrScheme IDE flags undefined variables in red, even though Scheme is
sufficiently dynamic that it cannot normally be sure that a variable is
undefined until it is accessed at runtime.  This can help a developer notice
issues while editing code, and decide whether any action needs to be taken.
What's the downside here?  Is it (a) impossible, (b) not important, (c) too
ambitious for insufficient payoff, (d) other?