Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: Re: Perl to Ruby translator?

by perrin (Chancellor)
on Oct 10, 2003 at 18:05 UTC ( [id://298360]=note: print w/replies, xml ) Need Help??


in reply to Re: Perl to Ruby translator?
in thread Perl to Ruby translator?

I unerstand your point, but wow, closures are a huge ongoing source of confusion and bugs. If every new feature is as problematic as closures, we're in for a rough ride.

Replies are listed 'Best First'.
Re^3: Perl to Ruby translator?
by Aristotle (Chancellor) on Oct 10, 2003 at 18:43 UTC

    This may sound arrogant, but - to what level of programmers? I can count on the fingers of one hand (with several to spare) the number of times I got myself in a bind with closures. As the old adage goes, real programmers can write FORTRAN in every language - I doubt anyone who makes a mess with Perl would write clean and sophisticated code if just given another language.

    I don't want to close the post on that note; I understand your concern and know just taking the indoctrinated stance on this doesn't make the problems in practice go away. But in my experience trading expressiveness for simplicity does not pay off in the long run. ("Simplicity" is not quite the right word either.)

    Makeshifts last the longest.

      People often don't realize that this is a closure:

      my $q = CGI->new() sub foo { my $thing = $q->param('thing'); }
      Then they try to use it in a persistent environment like mod_perl or FastCGI and they get screwed. I see this happen all the time.
        For at least my own education, if no one elses, how exactly is that a closure and why are people getting screwed doing it? It seems fairly simple to me..

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://298360]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others examining the Monastery: (4)
As of 2024-03-29 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found