3 ms·
scala != functional programming http://enfranchisedmind.com/blog/posts/scala-not-functional/ http://enfranchisedmind.com/blog/posts/scala-not-functional/ It do
by sandGorgon 16y ago
scala != functional programming
http://enfranchisedmind.com/blog/posts/scala-not-functional/ http://enfranchisedmind.com/blog/posts/scala-not-functional/
It does have functional programming constructs though
Clojure is a much better candidate for FP on the JVM.
- srean 16y agoYou are right. But scala does not make it any harder if one chooses to write functional code.
- gtani 16y agohttp://enfranchisedmind.com/blog/posts/what-is-a-functional-programming-language/ http://enfranchisedmind.com/blog/posts/what-is-a-functional-... Note: NOT written by same guy who did "Scala not Functional". Everybody has a different definition of FP in mind with these, uh, parameters: - "no hidden side effects"; clearly demarcated IO functions, database calls. - curry, partial function application; lexical closures - TCO - 1st class, higher-order functions - Immutable / persistent collections / data structures Altho most people agree that these are orthogonal to the definition of FP, (but nice to have: - type inference (ML's is variously referred to as Damas-Milner or Hindley-Milner) or static typing - lazy eval - pattern matching - green/lightweight threads with message passing OR STM/MVCC - monads,arrows, functors, CPS http://stackoverflow.com/questions/485418/distinctive-traits-of-the-functional-languages http://stackoverflow.com/questions/485418/distinctive-traits... http://stackoverflow.com/questions/1112773/what-are-the-core-concepts-in-functional-programming http://stackoverflow.com/questions/1112773/what-are-the-core...
- gtani 16y agois scala FP? Usually FP languages are : - lisps and schemes: CL, racket, - the ML/erlang/haskell axis incl ocaml, - spoken of in reverent tones: dylan, clean, mozart/oz - the JVM/CLR languages: clojure, F#, scala, groovy, jruby
- moondowner 16y agoWell you have the answer: "- the JVM/CLR languages: clojure, F#, scala, groovy, jruby" Yes, it is, it's and OO and FP.