develooper Front page | perl.perl6.language | Postings from May 2005

Re: bitter complaints

Thread Previous | Thread Next
From:
Larry Wall
Date:
May 6, 2005 11:36
Subject:
Re: bitter complaints
Message ID:
20050506183613.GC26857@wall.org
On Fri, May 06, 2005 at 06:46:58PM +0200, Juerd wrote:
: According to S03, the yada operator "complains bitterly" when used. In
: #perl6, we can't agree on what that means. Please help. Does it die,
: warn or fail?
: 
: 18:46 < Corion> Juerd: "Complain bitterly" is "output a warning" to me.
: 18:46 < Juerd> It's "die" to me
: 18:46 < Odin-> Juerd: Hmm. I'd read it as "print a huge, ten page banner
: alerting to an error, and then go on"...
: 
: And we want ??? and !!! to be aliases for ... if it dies, or to dieing
: yadas if ... itself merely warns:
: 
: 18:46 < Corion> Juerd: But "..." is more like "uh - I hope you know what
: you're doing", where "???" is more like "WTF?", and "!!!" is more like "WTF!"
: 18:47 < Corion> Juerd: I see "..." as having practical use when stubbing
: out code - I would want the code to warn but continue.  How else would
: you do that?
: 18:47 < Corion> sub do_magic { ... }
: 18:47 < Corion> looks good, and should warn "do_magic is not yet
: implemented at $?LINE"
: 18:48 < Corion> while
: 18:48 < Corion> sub magic { ??? }
: 18:48 < Corion> should die.
: 
: Though we'd have to discuss the precise meanings of "WTF?" and "WTF!".

I think I'd like to see:

	...	fail "$?BLOCKNAME is not yet implemented"
	???	warn "$?BLOCKNAME is not yet implemented"
	!!!	die  "$?BLOCKNAME is not yet implemented"

In other words, it's okay to call an undefined function in your
prototype as long as you don't actually use the value.  And then you
can force ... to !!!  with use fatal.

Larry

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