My continued technical defense of my code is in response to your request for "a retraction or substantiation" and in reaction to your apparent (and continuing)--unnecessary, unwarranted and unhelpful--personalisation of a technical debate.
There are three issues here:
I say yes, you say no. Unless and until tadman speaks up as arbitar, I will continue to believe it is.
If you are called to upgrade a piece of code that worked under Perl 5.1 (or whatever) before the warnings module became available, do you stick use warnings; at the top, and then say the guys that wrote it were useless when it fails? Of course not.
You questioned what I meant by "deliberately suppressed", and then go on to mention "warn=>die promotion". You got it. Hole in one. You added the signal handler, a deliberate act, "to suppress the warnings" you said, but then you replaced those warning with your own version of them. So, if fact the warnings were not suppressed, just changed to suit your output formatting requirements. I appreciate and always appreciated that this was your purpose (the formatting I mean), but the net effect of that particularly convoluted peice of code in conjuction with an eval, is that you not only suppressed the standard warning text just to replace it with your own. You also suppressed the output from the code which demonstrated that it met the stated requirements <cite>"returns 'aa,cc,dd,ff,hh',</cite> by doing a '<cite>warningless comparisons</cite>'.
In never said, nor meant to imply that this was a deliberate act, but why what you did do, was any better that allowing the warnings to be displayed alongside the output, I don't understand. Aesthetics?
Worse, not only did this hooky arrangement do this, it also suppressed many other flaws in your testcase which came to light when I disabled it. You subsequently blame these on "that annoying bug in elusion's code".
I note that in your 'fixed' version:
in sub eg_{} are identical to those in sub sg_{} which shows none of these problems?
The very same function that displayed none of the same noise when called in my code?
And the flaw lies where?
If you want to get into the game of nitpicking regarding good coding practice, your own efforts fall short of that by using $a and $b without localising them. In my original code, I held back from absolute minimalism, in order to retain the safety of localising any global vars I used.
Whilst, using -w; (very oft advocated advice here) & scoped $^W=0; as opposed to use warnings and scoped no warnings; may be seen (by some) as "creative interpretation" of the rules, it seemed to me to be well within the bounds of similar tactics used to reduce keystrokes in Perl golf. I'd remind you that the first word of the title of the original post was "(Golf)...".
Your imposition of additional rules is an entirely different kettle of fish. My comments regarding those additions were intended as light-hearted analogies, not insults.
As for whether the original challenge had a technically sound base, if you read the last part of my original post, I noted that I thought that the challenge was flawed and postulated an alternative and supplied code to support it.
As I said, I agree that the terms of the challenge were not perfect, but then golf challenges and their solutions often do play fast and loose with what could be termed 'production quality coding standards', but them's was the terms, and under (my interpretation) of those terms (rather than your interpretation of them), my code met them.
In my adaption of sauoq's and elusion's code--which I did by way of comparison and in an attempt to understand their rather natty, partial solutions--I attempted to apply the same standards of both safety and golf to their's as I had done to my own. I even admitted that it could be that my adaption of their code in this way was responsible for it's apparent weaknesses. And therein lies the difference. I didn't attempt to belittle their code, only state that I couldn't get it to work. In the case of aristotle's code, I didn't understand it enough to even get it to compile.
It appeared, and still appears to me that your code, rather than a simple attempt to extend mine, served only to support your interpretation of the rules and lay claim to the technical high ground.
Had you said, "Ah! But your breaking the rules by using -w instead of no warnings;"; I possibly would have responded in my usual fashion when I err, "Mea culpa!", "My bad!" or similar , as is unfortunately all too frquently demonstrated all over the site. As it was:
Hardly friendly.
Everything else that I'd like to say in response your last outburst, would be futile and unprofessional.
No, I do not retract!
In reply to Re: Re: Re: Re: Re: Re: Re: (Golf) Warningless Comparison
by BrowserUk
in thread (Golf) Warningless Comparison
by tadman
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |