From: Christophe Rhodes Date: Thu, 6 Feb 2014 08:11:59 +0000 (+0000) Subject: comments and figure from Jan X-Git-Url: http://christophe.rhodes.io/gitweb/?a=commitdiff_plain;h=5773631f063cdbe16e0880ce21c73cb0b911789c;p=paper-els-specializers.git comments and figure from Jan --- diff --git a/els-specializers.org b/els-specializers.org index 6af1392..d9b66cf 100644 --- a/els-specializers.org +++ b/els-specializers.org @@ -48,6 +48,10 @@ Paepke; AMOP?]. XXX include typical examples of MOP: object persistence; maybe ref. Kizcales "MOPs: why we want them and what else they can do"? (Fig. 2 in that is good) ORMs; sparse slots. + jmoringe: + + introspection, e.g. documentation generation + + programmatic construction of classes and generic functions + e.g. for IDL compilers, model transformations One area of functionality where there is scope for customization by the metaprogrammer is in the mechanics and semantics of method @@ -59,6 +63,8 @@ practice implementation support for this was weak until relatively recently (ref. closer, also check how ContextL and filtered dispatch are implemented). + jmoringe: filtered dispatch uses a custom method combination, i + think Another potential mechanism for customizing dispatch is implicit in the class structure defined by AMOP: standard specializer objects @@ -78,7 +84,12 @@ (ahem) the return value of =class-of=, and allows the metaprogrammer to hook into cacheing schemes to avoid needless recomputation of effective methods for sufficiently similar generic function - arguments. + arguments (See Figure\nbsp\ref{fig:dispatch}). + + #+CAPTION: Dispatch Comparison + #+LABEL: fig:dispatch + #+ATTR_LATEX: width=0.9\linewidth float + [[file:figures/dispatch-comparison.pdf]] The remaining sections in this paper can be read in any order. We give some motivating examples in section XX, including @@ -127,7 +138,7 @@ (defmethod specializer-accepts-p ((s cons-specializer) o) (and (consp o) (eql (car o) (%car s)))) -#| less interesting methods elided |# +#| less interesting methods elided: jmoringe: (un)parsing, specializer + + ))) + `(list ,@(mapcar #'make-parse-form specializer-names))) + #+end_src + for each generic function class. + #+end_quote - [ ] =make-method-lambda= revision (use environment arg?) + + jmoringe: would only be relevant for pattern dispatch, right? I + think, we didn't finish the discussion regarding special + variables vs. environment vs. new protocol function * Related Work - [ ] Newton/Rhodes - [ ] filtered dispatch diff --git a/figures/dispatch-comparison.pdf b/figures/dispatch-comparison.pdf new file mode 100644 index 0000000..9a29d1d Binary files /dev/null and b/figures/dispatch-comparison.pdf differ diff --git a/figures/dispatch-comparison.svg b/figures/dispatch-comparison.svg new file mode 100644 index 0000000..292c5de --- /dev/null +++ b/figures/dispatch-comparison.svg @@ -0,0 +1,515 @@ + + + + + + + + + + + + + + image/svg+xml + + + + + + + AMOP Dispatch + Generalized Dispatch + + + + Argument + + + + Specializer + + + + Generalizer + + + + Gen. Spec. + + + + Class + + + + + Eql-Spec. + + + + + + + + + + match class-of + match + s-a-g-p + generalizer-of + + + + + Argument + + + + Specializer + + + + Class + + + + + Eql-Spec. + + + + + + + match class-of + match + + specializer-accepts-generalizer-p + + +