Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #29640
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2016-02-20 04:03 -0800 |
| References | <9f70cd71-da91-478c-ac97-392fcb7c7a63@googlegroups.com> <8e0eb84d-66c8-41da-847b-759f634bc4cd@googlegroups.com> <286742ed-e3f3-466f-9b4d-b9deb5bb4442@googlegroups.com> <f9863dd4-3361-4fc6-ab37-808b4222887a@googlegroups.com> |
| Message-ID | <56e25c80-9c8e-4113-a6ad-07d7c321b5db@googlegroups.com> (permalink) |
| Subject | Re: library for fast map/filter/reduce |
| From | glathoud <glathoud@yahoo.fr> |
On Friday, February 19, 2016 at 5:44:31 PM UTC+1, Scott Sauyet wrote: > [...] please do take the criticism in the positive spirit in which it was intended. [...] No worries ! That's the way I understood your comments. And thanks for the compliments. > [...] I always edged my way around Dojo, using it when I was on > projects that already had it, but never introducing it. It always seemed > overblown, a designed-by-committee monstrosity. Yes... I once removed dojo from a production codebase, thus putting an end to recurring "daytime nightmares". I found comp.lang.javascript particularly useful in that context. > > > > Concerning the string lambdas: transfun.js permits both string lambdas and > > usual functions [...] It is probably a matter of context. > > Perhaps. I did see that both were available. To me, though, the string > lambdas are uncomfortable. They make me wonder about the overall design. > If I were to use the library, though, I do understand that I could simply > choose not to use them. > > These days, ES6 fat arrow syntax helps reduce the verbose nature of lambdas > in JS anyway, so some of the reason for these may not be so important. I > may be missing some of your motivation, though. One possible motivation is the extra speed - although the speed gain is not as important as the speed gain obtained from eliminating intermediate arrays. Another possible motivation is to generate flat code without resorting to function decompilation. A third motivation is that I just like to generate code :) More seriously it is nice to be able to look at one piece of generated code, hopefully still somewhat readable. Side note about lambdas: it would be nice to be able to write some without variables at all. OCaml has an interesting notation where one can wrap an operator + into a function (+) > > [...] > > Interesting. I've not worked with D, only read a few articles about it. > > I've always thought of it as a mostly imperative language, and didn't > even realize that it had functional APIs included. I can't tell from > their documentation if the claims from that post are justified or not. > It would be interesting to know. I had the same reaction and asked. The answer is yes: http://forum.dlang.org/thread/pbcwqhfgjghxezpsiblo@forum.dlang.org > > [...] > > > Side note: transfun.js offers a few selected transformations (especially > > the ones I often need), but anyone can write his own: > > > > http://glat.info/transfun/#defining > > That does improve the situation, but still doesn't give the expressiveness > that I like in pipelines. It doesn't allow me to use functions on the > fly, partially applying functions, using lambdas, etc. Ok. At this point of time I can only say that transfun's transformations support automatic currying - not documented, sorry. I have to look at the other topics you mentionned. Thanks for mentionning Trine. Best regards, Guillaume
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
library for fast map/filter/reduce glathoud <glathoud@yahoo.fr> - 2016-02-16 22:24 -0800
Re: library for fast map/filter/reduce Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-18 20:01 -0800
Re: library for fast map/filter/reduce glathoud <glathoud@yahoo.fr> - 2016-02-19 02:10 -0800
Re: library for fast map/filter/reduce Scott Sauyet <scott.sauyet@gmail.com> - 2016-02-19 08:44 -0800
Re: library for fast map/filter/reduce glathoud <glathoud@yahoo.fr> - 2016-02-20 04:03 -0800
Re: library for fast map/filter/reduce Ben Bacarisse <ben.usenet@bsb.me.uk> - 2016-02-20 13:59 +0000
Re: library for fast map/filter/reduce glathoud <glathoud@yahoo.fr> - 2016-02-23 21:53 -0800
Re: library for fast map/filter/reduce "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2016-02-23 19:22 -0800
Re: library for fast map/filter/reduce glathoud <glathoud@yahoo.fr> - 2016-02-23 22:11 -0800
csiph-web