Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re (tilly) 3: Operator Precedence

by tilly (Archbishop)
on Jul 23, 2001 at 07:48 UTC ( #98907=note: print w/replies, xml ) Need Help??


in reply to Re: Re (tilly) 1: Operator Precedence
in thread Operator Precedence

Please read, for a random example, the thread at RE: RE: Shot myself in the foot with a pos. My position from before when I arrived at PerlMonks is the same as it is now. There is a lot of stuff which I know that I rightly don't expect fellow programmers who are not primarily Perl programmers to know.

This is not a position that everyone agrees with me on. Not even, by a long shot, all good programmers. (If you know anything about who is who in the Perl world, then you will know who chip is.) However in the real world there is a lot to say for my position.

As for your position, huh? Do you really think that I have never looked at the precedence table? The fact that I don't advocate gratuitously abusing knowledge of it should not be taken as a sign of ignorance on my part. It is rather narrow-minded of you to assume that everyone who disagrees with you is more ignorant of this aspect of Perl than you are.

Besides which, your assumption is wrong.

My dislike of gratuitous abuse of operator precedence goes hand in hand with my dislike of using explicit positional logic when you don't have to. It is the same thing that leads me to write modularized code when I could write straight-line code for the task at hand. It has nothing to do with any inability on my part to do the things which I am avoiding. Instead it is my attempt to apply the principles that I believe lead to the most maintainable code for the environment that I am in.

Now do I think it is useful to know the precedence table? Well yes. Knowledge is always good It is good to not be confused by quirks like the following:

my %foo = "Hello", "World; print $foo{Hello};
(Of course if you use warnings you will be pointed at the error without having to have the precedence table memorized. Funny how that works...)

But I don't think that people should have to have the precedence table memorized to read my code. There are enough other things that they need to keep in mind which I consider more important...

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (3)
As of 2021-10-27 22:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My first memorable Perl project was:







    Results (94 votes). Check out past polls.

    Notices?