5 ms·
I like ruby but please, do not call it a functional language. Its not even remotely close.
by 55pts 14y ago
I like ruby but please, do not call it a functional language. Its not even remotely close.
- bigfudge 14y agoWhy not? Sure, neither ruby nor python emphasise immutability, and recursion isn't optimised, but both lend themselves to a functional style if you're so inclined. See http://stackoverflow.com/questions/159797/is-ruby-a-functional-language http://stackoverflow.com/questions/159797/is-ruby-a-function...
- Lio 14y agoActually MacRuby does do tail call optimisation (and so does MRI 1.9 if you turn it on).
- spacemanaki 14y agoI think 55pts makes an important distinction: just because it's possible to write programs in a functional style doesn't mean it's a functional language. The answer with the most votes in your SO link sums it up: Ruby is an imperative, OO language, and you can be generous and add that it has first-class functions and lexical closures. But JavaScript, Python, Perl, PHP, and C# fall in this category, and maybe Java 8 will too. If they are all "functional languages" then the phrase is meaningless.
- 55pts 14y agoWell said. Functional features do not a functional language make.