4 ms·
Sometimes sequence programming logic is easier to write and understand. Network streams being an example for me. The benefit I see of transducers is that it all
by talkingtab 3y ago
Sometimes sequence programming logic is easier to write and understand. Network streams being an example for me. The benefit I see of transducers is that it allows you to think with that model. For example if I want to find all image files on my computer, remove duplicates, etc. The processing is much easier for me to think about if I can think of it as one file at a time. Then some more sequential programming based on other characteristics of the file - like batching where and when it was taken.
I like the concept so much that I built a JavaScript version using generators.
Unfortunately, I do am not a fan of JavaScript at all and it appears that clojure now requires that I install a JVM. I realize that this is a very personal issue, but I am a "just say no to Java" person after using it for 10 years.
- Capricorn2481 3y ago?? Clojure has always run on the JVM
- kaba0 3y agoWhy would you say no to Java? Even if you dislike the language, it is a tool and we are supposedly professionals.
- talkingtab 3y agoI realize this is controversial, and am not saying it is even rational. I spent years writing Java. And at the end I just decided that I could have written the same stuff in maybe 1/4 of the time. I understand that some people see benefits from all the tedium of it, but in the end I just felt like I had wasted and enormous amount of time. The cost was way high compared to the benefit. My other reference is just as personal and perhaps just as irrational. Java was free to use. Then after many people and companies used this free tool, Oracle came along and wanted to exploit the fact that people had an investment in this. Yes. I know. Oracle can do what they like. They own it. But I can do what I like and that is not to use anything associated with Oracle. Ever. (EDIT: and yes I do know there are open source JVM's) So, no. I guess I am not professional.
- lbalazscs 3y agoOracle's main Java product (OpenJDK) is 100% open source and free to use. If you also want extra support, then you can also use the "Oracle JDK", which is technically the same as OpenJDK. The only difference is the support, which of course was never free.
- kaba0 3y ago> I could have written the same stuff in maybe 1/4 of the time The only way that might be even remotely true is if you were doing some very over-abstracted, bureaucratic complex bullshit app, but that would have be similarly longer no matter the language. As mentioned, Oracle itself offers that very free, libre same-license-as-linux OpenJDK, like they are responsible for 90+% of commits there. Their own support license sits basically on top the free offering for the very few gigacorps that need it, so basically almost every java implementation is open source as they just redistributed the OpenJDK codebase (yes, there are a few niche ones as well no one ever heard of).