What about a generator() keyword?[*]

        push @got, generator /bar/

Where generator keeps applying the EXPR or BLOCK until it runs out of results.

[*] This resembles something that I must have read about in ICON.

<chaim>

>>>>> "TC" == Tom Christiansen <[EMAIL PROTECTED]> writes:

TC> The reason why not is because you're adding a special case hack to 
TC> one particular place, rather than promoting a general mechanism
TC> that can be everywhere.  

TC> Tell me: which is better and why.

TC> 1) A regex switch to specify scalar context, as in a mythical /r:

TC>     push(@got, /bar/r)

TC> 2) A general mechanism, say for example, "scalar":

TC>     push(@got, scalar /bar/)

TC> Obviously the "scalar" is better, because it does not require that
TC> a new switch be learnt, nor is its use restricted to pattern matching.
TC> Furthermore, it's inarguably more mnemonic for the sense of "match this
TC> scalarishly".

-- 
Chaim Frenkel                                        Nonlinear Knowledge, Inc.
[EMAIL PROTECTED]                                               +1-718-236-0183

Reply via email to