in reply to Re^8: The trap of reference numification
in thread The trap of reference numification

Throwing an error is different from throwing a warning. I'm proposing that numification or stringification of a reference should be considered a runtime error, should die(), set $@ and all that jazz. Unfortunately, the meme of my $x = Foo->new; print "$x\n"; is so ingrained that it's an impossible solution to propose.

Throwing a warning is just plain old annoying. Now, making it an optional warning wouldn't be a bad idea.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^10: The trap of reference numification
by Roy Johnson (Monsignor) on Nov 12, 2005 at 03:34 UTC
    All warnings are optional, in the sense that you can turn them off with a fair degree of specificity.

    I'd be fine with there being no implicit numification, but I think that causing interpolation of some scalars into strings to kill your program is a Bad Idea. Correspondingly, I think that stringification is much less of a stumbling block, so maybe you could get half your wish.


    Caution: Contents may have been coded under pressure.