Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^4: variable set to 0 ? 0 : 1

by Flexx (Pilgrim)
on Sep 07, 2002 at 12:21 UTC ( [id://195868]=note: print w/replies, xml ) Need Help??


in reply to Re(3): variable set to 0 ? 0 : 1
in thread variable set to 0 ? 0 : 1

The point of formatting one's code is to make the meaning clear to the reader. (...) I *think* I know what the second line does, but I'm not 100% sure.

Hmm.. While I agree that some extra parens do no harm, I somewhat oppose the thought that using a languages (well documented) feature is "criminal". Someone's lack of specific experience or routine or different minting (no offence here) is not the "fault" of those more experienced/differently originated [uh - if this is wrong english, someone /mgs me please]. In the end, wondering about such constructs teaches us in the long run, right?

Then again, I actually agree with both of you... ;) While it's perfectly ok to add "markup" for your own/teammates convenience, to me it's ok, ethically, to exploit ones abilities and the abilities of the tool one is using (ahh.. well, unless you're a sniper with a precision gun).

Smith, where Jones had had had had had had had had had had had the examiner's approval

Well, I don't mean to be pernickety (but, hell, I am ;), but I'm not sure wether this example fits, since in that sentence punctuation is not optional. In English, for good reasons, punctuation -- especially to evade ambiguity -- is mandatory, while in Perl there are clear rules how to parse an (unambigous) term. However, I still wonder what the solution to that sentence is!? ;)

So long,
Flexx

Replies are listed 'Best First'.
Re^5: variable set to 0 ? 0 : 1
by talexb (Chancellor) on Sep 07, 2002 at 22:34 UTC
    Solution:

    Smith, where Jones had had "had had", had had "had"; "had had" had had the examiner's approval.

    In other words, in the exam that they both took, in one particular question, Jones wrote "had had", and Smith wrote "had". The correct answer, according to the examiner, was Jones' "had had".

    --t. alex
    but my friends call me T.

      I, where your father had had 'had had "had had", had had "had"; "had had" had had' had 'had had "had", had had "had had"; "had had" had had'; 'had had "had had", had had "had"; "had had" had had' had had talexb's approval.... ;-P

      i.e. "I had X where your father had Y; You were expecting an answer of Y."
      X and Y are slightly different ways punctuate the original string of hads.

      -Blake

        St. Larry! Leave me alone! ;)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (2)
As of 2024-04-19 22:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found