[Apologies if you see this as a duplicate. I sent the original to perl6-all by mistake]
On Thu, 08 Nov 2001 11:10:43 +0000, Piers Cawley wrote: > I keep coming back to the ruby/smalltalk > block approach > > &assert_with_func := { > | &^sub is constant, $^expected is constant, $^got, $message | > &^sub($^expected, $^got, $message); > }; > > Note that the suggested syntax is merely a 'port' from Ruby. I've not > really considered whether this syntax would fit well with perl. The > first | is reasonably obvious, but I'm not sure we can reliably spot > the closing one. I remember fretting about the same thing when I wrote a Smalltalk parser, and being surprised when it turned out not to be an issue. I think this was due to the limited kinds of expressions Smalltalk allows, but it was over a decade ago, and my memory may be faulty. Anyway, couldn't you say this? &assert_wth_func := sub(&^sub is constant, $^expected is constant, $^got, $message){ &^sub($^expected, $^got, $message); }; I'm not sure if that still curries appropriately, though. -- Peter Haworth [EMAIL PROTECTED] ``Sarathy was concerned by the use of a "whole bit" for this task'' -- Simon Cozens