[xquery-talk] adding comprehension to imperative languages or vice-versa

Ihe Onwuka ihe.onwuka at gmail.com
Tue Jun 23 23:29:05 PDT 2015


On Tue, Jun 23, 2015 at 8:42 PM, Pavel Minaev <int19h at gmail.com> wrote:

>
> That's why I love the fact that functional and declarative stuff is
> creeping into those mainstream imperative languages. It gradually gets me
> to the point where I can write neat declarative code *in production*, and
> no-one objects because they don't realize that it's radically different
> from what they're used to! (and those who do, are generally in the same
> boat as me and enjoy it the same). For them, it's just some new syntax that
> got added to the language they know and use, and so obviously it's okay by
> default.
>
>
I don't think this is generally applicable.  For example look at Google's
Python standards

https://google-styleguide.googlecode.com/svn/trunk/pyguide.html

Comprehensions are only allowed for "simple cases" otherwise use a loop. No
mention of fold anywhere in the document which I interpret as meaning don't
use it.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://x-query.com/pipermail/talk/attachments/20150624/ad5fc919/attachment.html>


More information about the talk mailing list