Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re^2: A new idiom -or- I Hate Unless

by chromatic (Archbishop)
on Aug 23, 2004 at 00:36 UTC ( [id://384991]=note: print w/replies, xml ) Need Help??


in reply to Re: A new idiom -or- I Hate Unless
in thread A new idiom -or- I Hate Unless

The main reason for my dislike is the puzzlement factor that a newcomer to Perl will have when encountering the statement.

Why should that be a concern? Do you use sequential alphanumeric identifiers for variables and subroutines to avoid the puzzlement that newcomers to English will have when encountering idiomatic words?

I agree with you about avoiding unless {} else {}, but that's because it's confusing to native English speakers as well. I don't believe that avoiding idioms -- where they'd otherwise be appropraite -- in deference to hypothetical unexperienced maintenance programmers is a good idea.

Update: I misread the parent post the first time, with which I agree. Sorry about that.

Replies are listed 'Best First'.
Re^3: A new idiom -or- I Hate Unless
by kappa (Chaplain) on Aug 23, 2004 at 12:52 UTC
    I agree with you about avoiding unless {} else {}, but that's because it's confusing to native English speakers as well.
    Is it? I'm not native (Russian) and the whole concept of unless is alien to me. But I got over it, and even got used to it and even became fond of it (due to Perl) :) Never thought that unless {} else {} does not look like real English. Thanks for education!

      I think the 'else' following an 'unless' in english is often spelled 'otherwise'. As in,

      unless its raining i will go to the swimming pool, otherwise ill watch + a movie.

      'else' in the context wouldn't be wrong, but it wouldnt be particularly idiomatic.

      All IMO of course.


      ---
      demerphq

        First they ignore you, then they laugh at you, then they fight you, then you win.
        -- Gandhi


Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others pondering the Monastery: (8)
As of 2024-04-25 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found