[xquery-talk] Izzit Bcos I is functional?

Ihe Onwuka ihe.onwuka at gmail.com
Thu Jun 18 03:23:12 PDT 2015


On Thu, Jun 18, 2015 at 5:47 AM, Michael Kay <mike at saxonica.com> wrote:

>
> "Even though, because it’s functional, it will be restricted to be used
> only by people with CS degrees, and not by
> random Joes and Janes who write web sites.
>
>
>
> Many people have reported that to use XSLT successfully, you either have
> to have a CS degree, or you have to be a non-programmer.
>

I learnt XSLT before my CS degree, my conceptual understanding hasn't
changed, but back then I would not have been able to grok you  the
recursion sometimes needed for things like string handling in XSLT 1.0.

All a degree does in this context is increase the likelihood that you have
been exposed to some sort of functional programming and I believe it is
still possible to get through most degree programmes without encountering
it.



> The people who struggle are those who want it to be like the only
> programming language they have used in the past. Functional programming
> comes much more naturally to non-programmers than to those whose minds have
> been warped by imperative programming.
>
>
True. This is the dilemma for Scala (or should be). They always want
 people already steeped in the Java ecosystem  and that makes sense but the
same people come from the population that will have the most difficulty
adapting to Functional programming and that makes no sense.


> Having said that, we do our best in XSLT to hide the technicalities: a
> non-programmer isn’t going to think of the apply-templates mechanism as a
> recursive descent with polymorphic function despatch, and they aren’t going
> to think of xsl:iterate as a fold operation taking a function as its
> argument.
>
>
It's how it's presented to the experienced programmer that is the issue. My
metaphor is that an XSLT processor converts an XML document to a stream of
events which you have to write handlers for in the form of template rules.
However that only covers XSLT's push paradigm and although I'd like to say
push is all you need I don't think it's true, sometimes you have to pull.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20150618/eb594384/attachment.html>


More information about the talk mailing list