5 ms·
Ruby, Python, Clojure, Scheme, Lua, even Scala. All better than JavaScript in most ways.
by lucian1900 13y ago
Ruby, Python, Clojure, Scheme, Lua, even Scala. All better than JavaScript in most ways.
- tel 13y agoI think it's inarguable that Ruby and especially Python are somewhat inhospitable to functional programming as compared to the rest of that list.
- lucian1900 13y agoNo less hospitable than JavaScript, which was my point.
- Touche 13y agoJavaScript is hospitable enough that you see entire applications written in a functional style. Where is the Python and Ruby applications written mostly in a functional style? I've never seen any.
- lucian1900 13y agoI've yet to see entire JavaScript applications written in a functional style. Just because "map" is used more often than Python doesn't make it functional.
- tel 13y agoI'd agree with this point. I don't think Python, Ruby, or Javascript are particularly "functional", whatever that means.
- tel 13y agoI disagree strongly w.r.t. Python as anonymous lambdas are heavily restricted there. I disagree less strongly but also somewhat insistently about Ruby where the distinction between methods and functions is warranted but thus involves more overhead.
- lucian1900 13y agoHaving to use "def" isn't the end of the world. You often end up naming your lambdas in a let in scheme anyway.
- Touche 13y agoBetter at being both a functional and object oriented language?
- lucian1900 13y agoBetter than JavaScript anyway, pretty much all of them.
- Touche 13y agoI didn't ask which are "better", I asked which are better at being both functional and object oriented at the same time. I can accept Lua, but the others I really need a good argument for.
- lucian1900 13y agoThey are all better at both than JavaScript. There is no feature that JavaScript has that the other languages don't, often in very similar shapes. The reverse is mostly not true.
- dragonwriter 13y ago> Better at being both a functional and object oriented language? Well that's both subjective and ambiguous (subjective in the evaluation of quality in each area, and ambiguous because the meaning of "better at a and b" can be interpreted in a number of ways, such as max by min(a,b), max by average(a,b), etc. But, given that, I'd say that several of the listed languages are better at "being both a functional and object oriented language" than JavaScript, including Scala and Ruby.
- Touche 13y agoSo where's all the functional Ruby code? I've never seen any.
- dragonwriter 13y ago
- collyw 13y agoPerl! How could you leave that out!
- lucian1900 13y agoTrue. Regardless of how disturbing I find it, Perl does qualify.
- angersock 13y agoJavascript is reliably second or third place to all of those mentioned, so it trumps. Worse is better, sorry.