develooper Front page | perl.perl5.porters | Postings from May 2008

Re: bug or not? constants warn only once

Thread Previous | Thread Next
From:
Nicholas Clark
Date:
May 3, 2008 15:40
Subject:
Re: bug or not? constants warn only once
Message ID:
20080503224004.GQ84051@plum.flirble.org
On Sat, May 03, 2008 at 10:20:17PM +0200, Bram wrote:
> Quoting Nicholas Clark <nick@ccl4.org>:
> 
> >On Sat, Apr 26, 2008 at 06:44:09PM +0100, Nicholas Clark wrote:
> >
> >>Do the appended tests codify the behaviour we desire?
> >>Anything I've missed that would be necessary to nail down this behaviour?
> >
> >I was rather hoping that *someone* might answer these questions, because
> >I wanted to commit the TODO tests to core and suggest them for a bounty 
> >from
> >the Vienna.pm programme.
> 
> But who do you expect to answer these question?
> Was there a consensus on how it should behave?
> 
> Reading the thread I don't feel there was one...

I was specifically proposing repeat warnings for "constants" in the optree
alone; other behaviour unchanged.
I remember valid arguments against changing the behaviour for anything else,
specifically warnings on values in variables.
I don't remember anyone stating that making constants in the program "more"
"constant" than they currently are was a bad thing.

But the question could be answered with "I object to this proposed change"
yet no-one did.

Neither did they reply by saying "it's a good idea"

It's hard to work in a vacuum.

Thanks for your feedback.

> I rather feel that no one is prepared (or feels qualified) to make a  
> decission on when it should and when it shouldn't warn and therfor  
> stays silent.

In the good old days (certainly five years ago) a lot of people had a lot of
*opinions* about technical bikesheds.

> The thread contains different views with regards to the warning(s).

Yes, but the timing of the warnings was conflated with the implementation
detail that causes the lack of repeat - the way the implementation caches
numeric/string conversions. The two should considered in separation.

a: What warning behaviour do we want?
b: What caching behaviour do we want?

It's not required that the the exact current warning and caching behaviour
be maintained. I agree that there was rough consensus - in the general case,
for values that are variables, the current behaviour of warning once at the
first conversion, then not warning again (which happens as a side effect of
the implementation strategy), was seen as good, and the behaviour should be
kept.

What I was asking for was feedback on the proposal we deem that it is
undesirable that constant values behave as if they have internal state.
(which it happens, as a side effect of the implementation, they do have.
But there is no requirement that they reveal what lies behind the curtain)

Feedback anyone is qualified to make (after all, they have a lot of opinions
on why Rails is slow, or what colour Perl 6 should be, neither of which are
on topic for a list about Pathological Eclectic Rubbish Lister, version
FIVE)

But no-one wishes to express an opinion.

Nicholas Clark

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About