| >>Ruby code to Haskell
|
| Uh... different paradigms. The scripting
| languages, which we are talking about here,
| are generally very similar.
Different languages are different, no matter how
many similarities that they have. You
are going
to run into issues porting between languages.
Expecting anything else is setting yourself up for
disappointment.
C++ and ObjC are both 'C-based', so there should
be zero issues porting code between them, right?
French and Spanish are both Latin-based, so they
are practically the same language, right?
| >> I welcome examples of where anonymous
| >> functions are unable to be replaced by
| >> local functions passed by reference.
|
| Where did I write "unable" -- did I disprove
| some Turing machine theorem and forget about it?
| :-)
Poorly worded on my part.
| In this specific case it was a declarative
| data structure with some data next to code. It
| was well suited to have a dozen or two short
| functions next to the data structures.
|
| You could rethink the whole thing and do
| something different in Python to keep it
| readable. But among the normal languages (in
| the same paradigm), Python is the odd man out,
| just because of the lack of multi line lambdas.
1. The inclusion of multi-line lambdas in a
language is what makes it 'normal'? This just
seems more like a personal opinion than anything
objective. I could easily say that Ruby is the
odd-man out and Perl/Python are the 'normal'
languages, because of this:
a = 0
if a
puts "Evaluates to True"
end
Or Perl is the odd-man-out and Ruby/Python are the
'normal' languages because they have a GIL.
2. If keeping the data structure and functions
together was the best use-case, then maybe Python
wasn't the tool for the job. Just like I wouldn't
talk about how crappy Ruby is because it doesn't
have SciPy/NumPy.