5 ms·
>* including but not limited to Haskell, Common Lisp, Scheme, Clojure, Scala and several ML variants * Any non-FP languages?
by elblanco 16y ago
>* including but not limited to Haskell, Common Lisp, Scheme, Clojure, Scala and several ML variants *
Any non-FP languages?
- Zak 16y agoMost languages that I would designate as "expressive" allow FP, but not all require it. Common Lisp isn't very functional; it doesn't even do tail-call elimination by default. It's idiomatic to use a fairly imperative style in CL. Scala allows FP, but also has OO that's fairly similar to Java with less boilerplate. Lua allows FP, but an imperative style is idiomatic (it doesn't even have map/reduce/filter built-in). Edit: BigForth is an implementation of Forth that seems to be pretty close to Java in speed. Forth is not a functional language. D is a fast language intended as a C++ replacement. Despite looking a bit like C++ or Java, it can be quite a bit more terse than either. D 2.0 adds quite a bit of FP support to make concurrency and parallelism easier, but you can still write C in D if you so choose.
- elblanco 16y agoI was not aware that D and Lua had the JVM as targets.
- Zak 16y agoYou only asked for non-FP languages, not non-FP languages with the JVM as a target. There's a Lua implementation for the JVM called kahlua. It appears to be in a fairly early stage of development and may not be fast or suitable for production use. As far as I know, there is not a D compiler for the JVM. Groovy appears to be potentially as fast as Java. It can call Java easily, which means you always have the option to rewrite something that's too slow in Java itself.
- elblanco 16y agoThanks again. Apologies if my terseness meant a loss in clarity. I thought the JVM was implicit in the thread and that you were listing languages with the JVM as targets (also my mistake as I see that you were not exclusively listing those, guess I should refrain from posting till I've had more sleep).