5 ms·
I recently escaped an organization that had a couple of apps built using this approach everywhere but for the opossite reason stated in the article. The team wa
by AugustoCAS 3y ago
I recently escaped an organization that had a couple of apps built using this approach everywhere but for the opossite reason stated in the article. The team wanted to write code in a functional way in Java because _FP is better than OO_.
Most (if not all) classes had a single method and implemented BiFunction. The app was wired with Spring... if you had the bad luck of using Spring you can get the idea of how ugly this was. All method invocations were `apply`s and navigating the code was as easy as finding a needle in a haystack in the middle of the night. A good amount of the wonderful features of a tool like IntelliJ couldn't be used.
My rule of thumb is to follow the grain of the language / framework / library as to produce as little surprise to other devs.
- a_wild_dandan 3y agoYour org avoided OOP...by using the quintessential OOP language? That is, ah, certainly a perfect way to fail at functional programming.
- c_crank 3y agoI now want to work at a shop that uses fully imperative Haskell.
- BeefWellington 3y agoWhat's amazing about this is there are other very good functional JVM languages they could be doing this with...