Skip to content
  1. May 23, 2009
  2. Apr 21, 2007
    • Pascal Costanza's avatar
      Several minor and major changes. · 2619daeb
      Pascal Costanza authored
      This version of ContextL (0.4) incorporates several minor and major changes as a preparation towards a 1.0 release. Here is a list of the changes:
      
      --- Changes in the visible API ---
      
      + The functions activate-layer and activate-layer-using-class have been renamed to adjoin-layer and adjoin-layer-using-class, and deactivate-layer and deactivate-layer-using-class have been renamed to remove-layer and remove-layer-using-class. The new names reflect better what these functions actually do.
      
      + Removed the functions funcall-with-layers and apply-with-layers. Use the functions funcall-with-layer-context and apply-with-layer-context instead.
      
      + The deflayer macro doesn't take a :layer-class option anymore, but instead a :metaclass option. (I have tried to abstract from the internal representation as CLOS classes, but that turns out to be useless for the time being.)
      
      --- Additions to the visible API ---
      
      + Added the functions funcall-with-layer-context and apply-with-layer-context.
      
      + Added the function current-layer-context. This captures the set of currently active layers, which can later be reinstalled with funcall-with-layer-context and apply-with-layer-context.
      
      + Added the metaclasses layered-function and layered-method. However, they should better not be used directly. For programmatically creating layered functions and methods, better use the functions ensure-layered-function and ensure-layered-method.
      
      + Added the readers layered-function-definer, layered-function-argument-precedence-order, layered-function-lambda-list.
      
      + Added the readers layered-method-lambda-list, layered-method-specializers, layered-method-layer.
      
      + Added the readers partial-class-defining-classes, partial-class-defining-metaclass and the class partial-object, which is the default superclass for partial classes.
      
      + Added the readers slot-definition-layered-readers and slot-definition-layered-writers.
      
      + You can now specify an :in-layer option in slot specifiers. This means that a slot within a define-layered-class form can be declared to be in a different layer than the respective class itself. This allows, for example, to group slots of different layers in the same define-layered-class form.
      
      + Layers and layered functions can now also have uninterned symbols as names. This enables a form of anonymous layers and anonymous layered functions when gensym is used to create names for them.
      
      + Added the function ensure-layer for programmatically creating layers.
      
      --- Internal changes, which are not necessarily visible ---
      
      + If someone tries to define default initargs for singleton classes or layers, ContextL emits a warning. The error handling is improved for the case when the :allocation for a singleton or layer-specific slot is set to something else than :class.
      
      + Some of the :in-layer keyword parameters to internal functions have previously taken lists of layers for technical reasons. This is not the case anymore.
      
      + Changed the handling of the :defining-metaclass option for partial classes.
      
      + Layered direct slot definition metaobjects don't take :layered-reader, :layered-writer and :layered-accessor initargs anymore, but rather :layered-readers and :layered-writers, which is closer to how the CLOS MOP works as well.
      
      + Added methods for print-object for the major classes and metaclasses, such that, for example, debug output now prints more nicely.
      
      darcs-hash:592a90c3f26522c79fcebd6c89449ae62c44dd41
      2619daeb
  3. Mar 03, 2006
    • Pascal Costanza's avatar
      Added clearer separation between layers and layer-classes. · 9c8b6d6e
      Pascal Costanza authored
      Layers and layer classes were somewhat mixed up until recently. (See also comments about singleton classes.) They are now more cleanly separated.
      
      Note that previous uses of find-layer have to be replaced by calls to find-layer-class. The function find-layer has now a slightly different meaning - it returns the prototye instance for a layer, not its class anymore.
      
      darcs-hash:f862d26e676edd3e41c48c4ac4179576fcbb449a
      9c8b6d6e
  4. Mar 02, 2006
  5. Nov 30, 2005
    • Pascal Costanza's avatar
      Improved parsing of layered methods. · f603ae53
      Pascal Costanza authored
      The :method option in define-layered-function is now parsed correctly, similar to how define-layered-method is parsed and processed. Furthermore, one can now give a name to the otherwise gensymmed layer parameter for a layered method. This is useful when one wants to call call-next-method with changed parameters. In that case, the layer parameter must be passed explicitly. (That's not optimal, but the best workaround I can think of.)
      
      Example:
      
      (define-layered-method some-function :in-layer (layer some-layer) (&rest some-parameters)
        (apply #'call-next-method layer ... changed parameters ... some-parameters))
      
      darcs-hash:fbf06d1eafa51057111a18e891026b4fba2160c3
      f603ae53
  6. Sep 19, 2005
  7. Sep 10, 2005
    • Pascal Costanza's avatar
      Added the possibility to ensure inactive layers + a number of bugfixes. · 37e1510b
      Pascal Costanza authored
      It's now possible to say with-inactive-layers, and the functional equivalents to with-active-layers have also been adapted to enable inactivation of layers. During the process, a number of bugs have been revealed, especially wrt the previous removal of &allow-other-keys and problems related to finalize-inheritance in Allegro Common Lisp.
      
      darcs-hash:aff71ea96cd5e5cc87944cc24bd01b5f3f5decdd
      37e1510b
    • Pascal Costanza's avatar
      Added define-layered-method, removed naming convention for layered methods. · 94f24dfe
      Pascal Costanza authored
      Until now, methods for layered functions had to be defined like this:
      
      (defmethod -function-name- ((layer some-layer) args ...)
        ...)
      
      People found this confusing and inconsistent with the other defining macros, i.e. define-layered-class and define-layered-function. Furthermore, they didn't like the naming convention that layered functions are named like function-name, and their methods are named like -function-name- (i.e. with preceding and succeeding dashes). So this has been replaced, and now the methods for layered functions are defined like that:
      
      (define-layered-method :in-layer some-layer (args ...)
        ...)
      
      Note that the :in-layer declaration has to come before the qualifiers, if any.
      
      Thanks to Bjoern Lindberg and Thomas F. Burdick for the concrete suggestions. Among other things, the new approach also has the advantage that the implementation of layered functions doesn't shine through.
      
      darcs-hash:9b6cd3a532c1358572da6342ebd4f8391aeb4768
      94f24dfe
    • Pascal Costanza's avatar
      cl:defmethod reverted to defmethod. · 327f239a
      Pascal Costanza authored
      I have changed one method definition to cl:defmethod because the LispWorks version of closer-mop redefines the defmethod macro. In that one case that led to a lack of recognizing additional keyword arguments. Closer-mop now includes a workaround for this, so that the workaround in ContextL is not necessary anymore.
      
      darcs-hash:da2573206be7ff12c1513708abf207899a390606
      327f239a
    • Pascal Costanza's avatar
      Removed spurious &allow-other-keys declarations. · 1c37d412
      Pascal Costanza authored
      darcs-hash:0fa0ec7b33bef78dac7de825ba35a8774838a348
      1c37d412
  8. Aug 22, 2005