Updated: 11/5/2005; 6:05:50 PM.
Chris Double's Radio Weblog

Monday, April 19, 2004

Finding Lisp mentions my article on continuation based web servers. For a Common Lisp version of this type of server see UnCommon Web. It does continuations in Common Lisp by using macros. The macro re-writes the code in continuation passing style to allow access to the current continuation.

11:03:29 AM      

When it comes to the Sealed/Unsealed question, I agree with James. The programming language Dylan has the option to 'seal' classes or generic functions. This prevents inheritance or adding methods to the generic function. Sealed is the default for everything unless you explicitly request things to be 'open'.

Time and time again I'd be caught out trying to reuse classes that were sealed and not be able to. For example, the DUIM (windowing API) classes are mostly 'open'. The specific Win32 implementations were sealed. I wanted to create a new type of Win32 class which would involve deriving from some of the other Win32 classes. Unfortunately they were sealed and I couldn't. I wanted to add methods to generic functions to add extra functionality to these classes. Again, I couldn't.

In the end the classes and generic functions were eventually made 'open' by the framework provider at my request but this was many months later and required me to duplicate and re-write lots of code. And this was mainly because sealed was the default, rather than having it sealed by design.

Another example, I like the way Common Lisp enables you to access variables not exported by a package. It requires you to access them in a different way to normal but you can still do it. There are simply times when you need to dive into the implementation of things that the originally designer thought you should be prevented from seeing. Having a way of doing this is invaluable when trying to do things 'outside of the box'.

In 'Scheme' I can't do this like I can in Common Lisp. Just about every Scheme module system in existance completely hides the non-exported functions and variables. There is no way of getting at them. For those times that you need to do it, if only for debugging purposes, or  extensions the designer of the library didn't anticipate, it's important. Without it I sometimes feel like I'm fighting the developer of the original library rather than working with them.

10:59:23 AM      

© Copyright 2005 Chris Double.
April 2004
Sun Mon Tue Wed Thu Fri Sat
        1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30  
Mar   May

Click here to visit the Radio UserLand website.

Listed on BlogShares

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.