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

Re: New Lisp ?



Andreas Bogk wrote:
> As soon as you pile up some layers of code, it quickly becomes tedious
> to pass around handlers everywhere.  Just imagine passing a GUI dialog
> for resolving a "disk full" condition all the way through the GUI,
> your application code, your storage abstraction down to the actual
> disk access.

What happens in Java is that you have to at least declare the exceptions
up the chain anyway (the compiler will reject a method that doesn't
catch or throw E which involves a method declared to throw E.  It isn't
that much harder to explicitly pass the handler.  

> So you get all the performance benefits you'd get when implementing
> integers specially, like Java does, but still <integer>s are regular
> objects, and you can get the same kind of performance benefits for
> your own classes.

Yes and no.  They're not "regular objects" because they can't be
subclassed.  I think what you'd see in any kind of production
environment if Dylan were used is that almost everything would get
sealed off, much the way a lot of Java code makes extensive use of
"final."  At that point, you might as well just use a static block
compiler and let the compiler recognize what is subclassed and what
isn't.



Follow-Ups: References: