Newsgroups: perl.perl6.language Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!nntp.perl.org Return-Path: Mailing-List: contact perl6-language-h...@perl.org; run by ezmlm Delivered-To: mailing list perl6-langu...@perl.org Date: Wed, 30 Oct 2002 10:33:49 -0600 To: Michael Lazzaro Cc: perl6-langu...@perl.org Subject: Re: [RFC] Perl6 Operator List, Take 5 Message-ID: <20021030103349.E31802@cbi.tamucc.edu> Reply-To: d...@pobox.com References: <43215E86-EBA5-11D6-AC84-00050245244A@cognitivity.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <43215E86-EBA5-11D6-AC84-00050245244A@cognitivity.com>; from mlazzaro@cognitivity.com on Tue, Oct 29, 2002 at 05:16:48PM -0800 X-SMTPD: qpsmtpd/0.12, http://develooper.com/code/qpsmtpd/ Approved: n...@nntp.perl.org From: d...@cbi.tamucc.edu (Jonathan Scott Duff) Lines: 63 Maybe we've gone over this before but, if so, I don't remember ... On Tue, Oct 29, 2002 at 05:16:48PM -0800, Michael Lazzaro wrote: > hyperoperators: > > [op] - as prefix to any unary/binary operator, "vectorizes" the > operator > . - method call on current topic What would [.]method() mean? > < > <= >= == != <=> - comparision > lt gt le ge eq ne cmp What do these do? if $a [<] @b { ... } # if $a < all(*@b) ??? if @a [<] @b { ... } # if $a[0] < all(*@b) && # $a[1] < all(*@b) && # $a[2] < all(*@b) && ... ??? > & | ^ - superpositional operations $a [&] @b # all($a,*@b) ??? @a [&] @b # all(*@a,*@b) ??? > => - pair creator %hash = (@a [=>] @b); # %hash{@a} = @b; ??? %hash = (@a [=>] $b); # %hash{@a} = ($b) x @a; ??? > , - list creator @a = ($b [,] @c); # @a = ($b, *@c); ??? > ; - "greater comma", list-of-lists creator > : - adverbial I'm not even sure how to hyper these two. I guess if I had an array of "range objects" I could hyper ; Would this write to several filehandles? print @file_handles [:] "fooey!\n"; > .. - range And this is the one that made me start thinking about hypering the others @a = @b[..]@c # @a = ($b[0]..$c[0], $b[1]..$c[1], ...) ??? @a = $b[..]@c # @a = ($b..$c[0], $b..$c[1], ...) ??? @a = @b[..]$c # @a = ($b[0]..$c, $b[1]..$c, ...) ??? I know that this stuff probably seems obvious to everyone, but I'd rather have it explicit just in case :-) -Scott -- Jonathan Scott Duff d...@cbi.tamucc.edu