Newsgroups: comp.lang.lisp
From: james anderson <james.ander...@setf.de>
Date: Thu, 25 Sep 2003 20:01:22 +0200
Local: Thurs, Sep 25 2003 2:01 pm
Subject: Re: Synonym streams
"Steven M. Haflich" wrote: thank you for returning to it. i did not follow your conclusions the first > Kent M Pitman wrote: > >>Gray Streams, Simple Streams, any number of streamish window systems, > > These aren't really paradigms. These are implementation strategies. > Sorry for being away from this thread so long, time and i welcome the chance to understand the issue. > but I really cannot agree but no specialization relation is autmatic. if one neglects issues of > with the above statement. All these things are not implementation > strategies; they are APIs avaialble to client code, even extensible APIs. > ... > > I'm not sure I get your point here. > The point is that the implementor of any module that defines non-CL-package > > "might have to be extended". It seems to me that synonym streams _could_ > But a synonym strteam would not automatically be a subclass of a finalization and encapsulation which would preclude a subclass, why can not a synonym stream not treat these as protocol classes to be specialized, or, alternatively, assuming that the api is intended to be extended, why can't it specialize some abstract class, for which the abstract functions in the interface are then written? yes, the implementors of the protocol cannot make it so, but they can allow the users to. as i noted in my earlier query, delegation in lisp depends on a binding for > > I'm sure it was originally considered when synonym streams were invented this is where i don't understand why that is a problem. that > > since the Lisp Machine uses both synonym streams and "new flavors" > > (essentially a syntactic variant of CLOS) pretty extensively in the > > implementation of Dynamic Windows (conceptually very similar to CLIM). > There was a time, before they went bankrupt, that Symbolics had lotsa money make-synonym-stream does not include a means to specify the class of the stream is a problem. which problem is common to all elements of the standard stream interface, not particular to synonym streams. > I repeat my opinion that the ANS delegating streams (synonym, contatenating, the concrete class, to the standard creation functions, what problem would remain? if i take a tiny example. let's say i would like to generate svg. i have these in this case, the base generic function and default definitions are all (defProjectionOp line (l1 l2 &optional properties)) in order to provide for delegation - or whatever sort - i would think that (defmethod op ((instance delegate) &rest args) are there alternatives? given that, the generation function for delegatable (push `(:method ((delegate delegate-context) ,@lambda-list) which is not that complex and provides for any class which specializes (defClass svg-presenter () () (defClass svg-context (aspect-context) (defclass svg-wrapper-context (delegate-context svg-presenter stream) (defParameter *svg-output* nil) (defClass svg-synonym-context (delegate-context svg-presenter synonym-stream) (defMethod effective-context ((synonym-context svg-synonym-context)) [ ignoring the stream operations which the wrapper needs to act as a stream ] the concrete serialization looks something like this (defun svg-line*3 (x1 y1 z1 x2 y2 z2 &optional aspects) (defMethod .og.::line*3 ((context svg-context) x1 y1 z1 x2 y2 z2 &optional aspects) (defMethod .og.::line*2 ((context svg-context) x1 y1 x2 y2 &optional aspects) (defMethod .og.::line ((context svg-context) l1 l2 &optional aspects) the projection interface looks something like this (defgeneric present (instance context) and the usage looks something like this (defParameter *svgc* (make-instance 'svg-context :stream *trace-output*)) (defParameter *svg-wc* (make-instance 'svg-wrapper-context :context *svgc*)) (defParameter *svg-sc* (make-instance 'svg-synonym-context :symbol '*svg-output*)) (setq *svg-output* *svg-wc*) (with-projection-context (*svgc*) wherein i discern no difference between synonym classes and wrapper classes. ... You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||