http://qs321.pair.com?node_id=11138782


in reply to Re: What technical benfits perl offers over python + few more questions.
in thread What technical benfits perl offers over python + few more questions.

> 2. I'm not sure I understand how a function can be thought of as a second-class citizen;

because that's FUD

"First class object" aka citizen basically means you can pass functions around as arguments to other functions. E.G. most BASIC dialects I've seen couldn't do that.

It's a necessity for functional programming...

Perl is actually better in functional programming, since Python is restricting lambdas to one expressions only, while anonymous subs are free.

And Python doesn't offer any block prototype to make it even easier like sub foo (&) { $code = shift; ... }

Superficial people will claim that the need to explicitly reference named subs in Perl with ...

\&foo

means they are not first class.

Superficially so because almost everything in Python is implicitly a reference.

Now, who said explicit is better than implicit again ...???

Cheers Rolf
(addicted to the Perl Programming Language :)
Wikisyntax for the Monastery