[xquery-talk] adding comprehension to imperative languages or vice-versa
int19h at gmail.com
Tue Jun 23 17:42:09 PDT 2015
It's not really a matter of learning something new - it's more about
practicality. I know XQuery, Haskell etc, for example, but for purely
pragmatic reasons (such as the need to use existing libraries, and the
desire to use them with ease - i.e. without mucking around with FFI, and
the associated impedance mismatch that using a library written in an
imperative language like C from a pure functional language causes), and
because I'm not working on that code alone and other people should be able
to pick it up where I left it and continue working, 99% of the time I'm
writing in C++, C#, Python etc.
Simply put, the requirement to work with other people and to interoperate
with other systems makes more conventional stuff *more productive*,
ironically, while unconventional things that break away from the mold are
only more productive in a hypothetical universe where they are all by
themselves and everyone and everything is starting from a clean slate
(which does in fact occasionally happen IRL when there appears a new niche
that is not [yet] tightly connected to everything else).
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
I think we'll eventually get to your 95%+5% end goal this way anyway. It
will just be slow enough that nobody will notice other than in retrospect.
On Tue, Jun 23, 2015 at 4:23 PM, daniela florescu <dflorescu at me.com> wrote:
> > As far as what's "better", I think that there are really two different
> questions here: what's "better" in The Right Way sense, and what's "better"
> in a "how do you get people to use this" sense. For the latter, there's no
> doubt in my mind that the way there is to get existing mainstream languages
> (which are all imperative at heart) to adopt more declarative goodness,
> including comprehensions/queries, as a subset - it's a much gentler
> transition for existing users of those languages, and more importantly,
> it's like a new instrument magically appearing in a toolbox that they
> already use daily - at some point they're bound to pick it up and use it
> even just out of sheer curiosity. It's much harder to get someone
> interested in a completely new language in comparison.
> As I said in my previous email.
> Now in 2015 I realize that developers have their “favorite” language, and
> making them change it’s close to
> impossible, so the optimal is to give them better tools to do their job in
> THE language they are more productive in.
> (ever crossed your mind why in an EC commerce site when you sort on
> price/sometinh, it GOES BACK TO THE SERVER most of the time to
> do a simple sort on 20 products !???? Sounds stupid no, ? well, that’s
> It’s better for those imperative languages to HAVE a sequence
> comprehension then NOT to have it. It makes the developers
> in those languages (who otherwise wouldn’t have changed anyway…) more
> Now, the fact that 90% of developers like comfort and/or are learning
> impaired and cannot learn something new
> does NOT mean that ALL developers are lazy and/or learning impaired and
> cannot learn something new…..
> For those who CAN learn something new, or for the fresh new students with
> blank, fresh new minds…..well, teach them something better
> and more productive.
> And that would be (according to me..) the OTHER way around: a language 95%
> declarative + 5% imperative.
> As I gave you as an example: when Oracle Fusion started the idea was that
> Java, being easier to program in then the “declarative” PL-SQL…. the
> applications will be MUCH better.
> Well, 10 years later, multi-billion investment with epsilon returns, it
> turns out that the PL-SQL version was MUCH better then the Java version.
> (1000 times more code, more bugs, less productive, more developers, more
> politics and decision makers, etc, etc — as simple as that ..)
> A failure that Oracle never talks about ….. just Oracle Fusion silently
> disappeared from the marketing slides :-)
> So, no, I would not take either side at this point.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the talk