in reply to Perl's functional features compared with Ruby
Variables are implicitly declared by first initialization. This leads to ambiguities if you try to assign to a closed over variable. (and sabotages any attempt to realize strict)
IIRC it wasn't clear if a closed over variable belonged to the top or the middle scope. This lead to changes between different versions and therefore to incompatibilities.
refer to RFC: Simulating Ruby's "yield" and "blocks" in Perl as an example.
or compare lamdas in Perl { my ($x,$y) = @_; ... } and Ruby { | x,y | ... }
Quoting Guido: "From a 10 km above perspective Python, Perl and Ruby are the same language".
I'd like to add from a 10 m perspective this already applies to Perl and Ruby!
Matz based Ruby mostly on Perl attempting a more pleasant syntax and later spending much time denying it.
This includes FP!
Maybe stackoverflow is a better place to ask and attract more polyglot crowd for in detail analysis.
Cheers Rolf
( addicted to the Perl Programming Language)
|
|---|