On Sat, Jul 24, 2004 at 11:59:30AM -0400, Jonadab the Unsightly One wrote:
: 
: Correct me if I'm wrong, but, by analogy with $foo.bar(), ...
: 
: >     No          Yes
: >     --          ---
: >     @foo        @foo[1]
: >     %bar        %bar{"a"} or %bar«a»
: >     $foo.bar    $foo.bar()
: >     &foo        &foo(1)
:       @foo        @foo.join(" ")
: 
: Yes?

Yes, that would presumably work.

: /me idly wonders whether map and grep and sort could be made into
: methods on the array class and chained together and interplated as
: such...
: 
: print "@foo.map({[$_,wibble($_)]}).sort([EMAIL PROTECTED] cmp @$b[1]}).map([EMAIL 
PROTECTED])";
: 
: Ugh, that looks horrible.  Of course, one could probably define a
: .schwartz() method on the array class and do the above thusly...
: 
: print "@foo.schwartz({wibble($_)},{$a cmp $b})";
: 
: That doesn't buy you the flexibility to throw in extra steps (like a
: grep in the middle), but it sure is easier to read.  

Well, on that specific topic I'd suggest going back and looking at
the sort syntax thread we had several months ago.  What we ended up with
has ST built in, among other things.

: Of course one could argue that sensible people would assign the
: processed list to an array variable first and then interplate that...

There are any number of syntactic constructs that people can abuse.
It's actually pretty rare that I get a bee in my bonnet about one of
them and place arbitrary limits.   I do that with statement modifiers
and with required braces on blocks.

Larry

Reply via email to