On Wed, Mar 16, 2005 at 01:30:10PM +0800, Autrijus Tang wrote:
: On Wed, Mar 16, 2005 at 12:31:05PM +1100, Andrew Savige wrote:
: > Ferreting around in the #perl6 logs I noticed an acknowledgement
: > that short-circuiting is "borken" as at 15 Maart. Oh well, time
: > for the "mad golfer" to dust off his trusty sand iron and hack
: > his way out of this punishing Pugs sand trap. :-)
: 
: ...as of r781, short circuit operators is now back; I added an
: "isThunk" internal trait to parameters, thereby successfully
: delayed the second parameter from evaluating.
: 
: I wonder if there is a way to expose this trait to the user,
: though... A quick grep did not find anything. Anyone got ideas?

For the most part we'll delay evaluation with explicit curlies.
In general I don't think we should be encouraging people to write
a lot of delayed evaluation macros that aren't explicitly marked as
thunks with curlies.  In fact, we're going the other direction with
grep and map's first argument, and not allowing the bare form of thunk
that Perl 5 allows.  Every time you allow bare thunks, you disallow
passing a reference to a thunk instead.

That's not to say that we won't allow people to write their own
control structures.  But we just shouldn't encourage people to
do that without considering the consequences.  And certainly we
plan to give them most of the standard control structures they
want anyway.  But I could see someone wanting to do an && analog
that has additional semantics like unification or hypotheticality
built in.

Larry

Reply via email to