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

He proposed that. You then gave situations where you don't do what you just suggested to to. I think it might help if you stated your view a little clearer, or at least mentioned that you changed views or the poor OP is going to go crazy trying to talk to you.


___________
Eric Hodges $_='y==QAe=e?y==QG@>@?iy==QVq?f?=a@iG?=QQ=Q?9'; s/(.)/ord($1)-50/eigs;tr/6123457/- \/|\\\_\n/;print;
  • Comment on Re^8: The trap of reference numification

Replies are listed 'Best First'.
Re^9: The trap of reference numification
by dragonchild (Archbishop) on Nov 12, 2005 at 03:18 UTC
    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?
      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.