I really enjoyed this presentation on YouTube <htt...
# arrow
j
I really enjoyed this presentation on YouTube

https://youtu.be/VOZZTSuDMFE

and very interested in Arrow, but a scared off by some recent “Functional Programming” elitism I have seen in the Scala community. 1/ I really like type classes (I learned about them from tooling around in Haskell) and most of my substantial systems in the last ten years could have made good use of them. It’s generally a good idea to include them as part of the language (both Kotlin and Scala). 2/ I did write two 50,000+ line systems (server-side JVM), each with immutable models only. I did use shallow trait inheritance. I also used Akka Actors, each actor with a single var, for concurrency. (This was before typed actors.) All substantial business logic was part of the immutable classes. I thought I was doing functional programming in the immutable parts of the code (almost all of it) even without a library like Arrow or ScalaZ. My point is that functional programming is larger than and pre-dates category theory-style libraries. Before Scala I also wrote substantial systems in Standard ML, Common Lisp, and quite a lot of functional Scheme. Immutable and first class functions are good for programming even if not done with higher kinded types! 3/ I really worry that some Scala FP people, in pushing purity (puritanism?) have not convinced and tried to bring along the rest of the programming community by showing that these techniques are useful in context, but instead tried to look for converts who would reject prior learning and experience. I think this is a huge mistake and harmful not only to language communities but also turns many programmers away from what FP has to offer. It becomes more of an esoteric society than a useful way of writing systems. 4/ Programming languages and programming styles are tools for human being to think with. The only relevant question is do they help human beings think about and solve problems and communicate ideas to others. I’ve seen clean, easily understood FP programs and just as good OOP programs. I’ve seen really bad FP and OOP programs! We need to face that there are some domains that FP does not handle well even though many people have tried. Real world simulation models are still much better expressed as OOP (or mixed FP/OOP). Pure FP code for complex UI programming is really much harder to understand. (And yes, React is very impure in case you are wondering.) I like Kotlin a lot, including it’s embrace of multi-paradigm development. I hope Arrow can leave dogmatism at the door and ask more where can FP convincingly embraced as useful. It is important be willing to accept that FP is not the final programming paradigm and may not always be the best choice for actual human developers. 5/ How can you write substantial FP applications without functional (persistent) data structures? I’d imagine the alternative is to do a whole lot of copying and use much more memory for lack of shared data. I was pretty shocked that a good package of functional data types was not a key part of Arrow, or perhaps my impression is out of date? Can anyone recommend a library? Thanks!
r
Hi @Jonathan Smith that presentation is very outdated to what Arrow is and it’s going to be next week in 0.12 and 0.13 releases. Arrow is going to be based on continuations and suspensions which offer a model for things in Scala are traditionally encoded with kinded types. Arrow and the Arrow community is very different from many Scala communities. I’m part of some of those Scala communities and the application of FP differs in Kotlin because of suspension.
In whatever case I have not observed the elitism you mention in the Kotlin FP community for what is worth.
👍 1
b
I don't know about the Scala community but what I know is that the Arrow community is the exact opposite of elitism. People here are nice and the only thing they want is to share their knowledge and help noobs like me. Don't just believe me, randomly scroll up in this Slack channel and look at the kind of conversation people are having. Everyone here is friendly and willing to help
❤️ 12