On 20 Sep 2000, Russ Allbery wrote:
> About the only piece of code of mine that this would affect are places
> where I use ++ on an undef value, and that's not a bad thing to avoid as a
> matter of style anyway (usually I'm just setting a flag and = 1 would work
> just as well; either that, or it's easy enough to explicitly initialize
> the counter to 0).
Depends. While it is possible to initialise counters in the canonical
"have I seen this before" situation, it's more convenient the way it is at
the moment:
$seen{$word}++;
looks, to me, nicer than
$seen{$word} = (exists $seen{$word}) ? 1 : $seen{$word} + 1;
or
if(defined($seen{$word})) { $seen{$word}++ } else { $seen{$word} = 1 }
or similar.
Cheers,
Philip
--
Philip Newton <[EMAIL PROTECTED]>
- Re: RFC 263 (v1) Add null() keyword and funda... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword and fundamental da... Jonathan Scott Duff
- Re: RFC 263 (v1) Add null() keyword and fundament... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and funda... iain truskett
- Re: RFC 263 (v1) Add null() keyword and funda... Damien Neil
- Re: RFC 263 (v1) Add null() keyword and funda... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and fundamental da... John Porter
- Re: RFC 263 (v1) Add null() keyword and fundament... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword and fundamental da... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and fundament... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword and fundament... Philip Newton
- Re: RFC 263 (v1) Add null() keyword and funda... Tom Christiansen
- Re: RFC 263 (v1) Add null() keyword and funda... Philip Newton
- Re: RFC 263 (v1) Add null() keyword and funda... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and funda... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and funda... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and funda... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and funda... Glenn Linderman
- Re: RFC 263 (v1) Add null() keyword and funda... John Porter
- Re: RFC 263 (v1) Add null() keyword and funda... Russ Allbery
- Re: RFC 263 (v1) Add null() keyword and funda... Glenn Linderman
