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

Re: Good book on Dylan?



Mark Jordan wrote:
> After my original post I realised that Dylan must also have similar
> levels of indirection to C++ for interfaces and probably be no
> more efficient, although I don't know for sure.

Not exactly.

> Does Dylan have a keyword or some other means to tell the compiler
> that it can optimise all it likes because the object behind the interface
> isn't going to change at runtime?

Yes.  By default, "interfaces" are closed and can't be extended outside
the module (modules can contain multiple files), allowing the compiler
to optimize away dispatch.  If you want full dynamism, you have to
explicitly open them up.

> I suppose what I'm saying is that in
> the majority of cases I only need compile-time polymorphism, not
> full blown run-time polymorphism.

You'll like Dylan.



Follow-Ups: References: