in reply to Re: Re: Re: A set of new operators. In keeping with the design of Perl?
in thread A set of new operators. In keeping with the design of Perl?
That probably would make for a better metric. Also, only counting those uses of the ternary where there are only 2 not 3 operands in play would also improve it; But I can't work out how to write the regex for that:)
I take your point though, these operators probably wouldn't be use that often.
Then again, how often have you ever used the ... version of the flip-flop operator? Other than when I was trying to understand it and find uses for it, I've never used it in anger, but I wouldn't exclude it from the language unless it caused the compiler or the interpreter some level of penalty on code that didn't use it. YMMV, and maybe there isn't enough reason to add something which is obviously more work than just leaving something that is already there.
Oh well. T'was just a thought:) Though it is a recurring one going back many years to other languages that have the ternary op. Perl has resolved so many of the annoyances of syntax that bugged me in C and Java, that this seemed like another candidate.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Re: Re: A set of new operators. In keeping with the design of Perl?
by zby (Vicar) on May 19, 2003 at 10:38 UTC |