4 ms·
I think the end result is going to be companies adopting functional concepts. I can't find the article right now, but Carmack wrote about how even though he was
by matwood 10y ago
I think the end result is going to be companies adopting functional concepts. I can't find the article right now, but Carmack wrote about how even though he was not sure if he would write a whole game engine in something like Haskell, just learning to think functionally improved his C coding.
Java has had lambdas and streams for awhile now. A pretty common design pattern has also become anemic domain models operated on by groups of functions, which fits in the spirit of functional programming. Modern java can, and is used in a functional style.
On the JS side, functional concepts are everywhere. Given how heavily FB and Twitter are invested in JS, I don't think they have abandoned functional programming at all.
Finally, IMO Scala is actually a pretty poor example of a language that can be used at scale. Without a highly enforced set of rules it can quickly become a write once/read never language. I'm sure there are exceptions, but given the choice between scala and java 8+, I would go with java. Clojure may be an option though.
- tjalfi 10y agoWere you thinking of http://www.gamasutra.com/view/news/169296/Indepth_Functional_programming_in_C.php http://www.gamasutra.com/view/news/169296/Indepth_Functional...?
- matwood 10y agoYes, thanks!
- 0x445442 10y agoYeah, my Java code pretty consists of two categories of class types now days. Pojo's which are just data structures or a glorified HashMaps for holding data. And, if allowed, using Lombok to get rid of all the getter/setter cruft. The second category of class types are just Service classes. These classes hold no state and are a logical grouping of methods that typically operate on a given data type. However, the class is based more on a specific role it performs than the type(s) it operates on. Also, there's considerable thought given to reuse of the Service classes outside the given context at hand.