[Gllug] Introduction (not really relevant to anything, just saying hello)
Nix
nix at esperi.org.uk
Sat Jun 26 19:59:24 UTC 2004
On Thu, 24 Jun 2004, Russell Howe stated:
> These are the ones which I can come up with off the top of my head:
>
> * Do nothing. Provide an abstraction of common functionality, with possibly a way to interface directly to the implementation
> * underneath for those callers who want to do more.
> * Make your abstraction have an extendible method of advertising extensions to the common feature set. I think IMAP has a way for a
> * client to ask the server "What commands do you support?". Does this really differ from the above?
A commonly-used special case of this is `provide callbacks to allow
implementations to modify and extend the behaviour of the general case.'
This is extremely common in Lisp-based systems and systems whose design
was influenced by Lisp (such as GCC ;} ).
> * Make your abstraction the superset of all implementations, and where an implementation is lacking, emulate the
> * functionality. Things like graphics libraries spring to mind - software emulation for features not present in hardware.
In GCC, we have a third case (recognisably derived from the Lisp way):
* Instead of doing the job generically, make a little language
which produces special-case code which does what's desired, and then
implement all the extensions in that little language.
GCC makes even heavier use of this than does Emacs, with a little
language (md) interpreted by numerous code generators. (Of course,
it also has several little languages which exist only in memory:
RTL, GENERIC, GIMPLE, and (sort of) annotated parse trees.)
NeWS also did things that way, I hear.
> This must've been a problem before computers were around, so does
> anyone know of any 'classic' solutions to this? "Back in Plato's day,
> when I were a lad..."
The `little language' solution is ancient. What else are mathematical
notations?
(Hell, what else is written language?)
--
`We in no way believe that this Christ was a space alien.'
--- A creationist website goes completely bonkers
--
Gllug mailing list - Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug
More information about the GLLUG
mailing list