- From: Florent Georges <fgeorges@fgeorges.org>
- Date: Sun, 21 Jul 2013 13:24:03 +0200
- To: Geert Josten <geert.josten@dayon.nl>
- Cc: Jostein Austvik Jacobsen <josteinaj@gmail.com>, XProc Dev <xproc-dev@w3.org>
On 19 July 2013 21:07, Geert Josten wrote: Hi, > It really is much alike higher order functions, perhaps just > more than you realized.. That claim does not help to see how it would. As far as I understand, the discussed use case is to be able to declare the step my:if so the following: <my:if test="..."> <px:xpath-context .../> [ sub-pipeline ] </my:if> is equivalent to: <p:choose> <p:when test="..."> <px:xpath-context .../> [ sub-pipeline ] </p:when> <p:otherwise> <p:identity/> </p:otherwise> </p:choose> This is a macro definition. Like the powerful 'defmacro' in Lisp. Function items give the ability to call a step using a dynamic reference, rather than a static name, and to pass those references around. I think this macro feature would be a very convenient feature. And could help fighting the verbosity of the language: if you find yourself using all the time the same constructs (like the "if then something else identity" above), then you can improve the language yourself... Regards, -- Florent Georges http://fgeorges.org/ http://h2oconsulting.be/
Received on Sunday, 21 July 2013 11:24:50 UTC