Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Operators that keep going and going...

8 views
Skip to first unread message

Carissa

unread,
Mar 13, 2004, 10:30:06 PM3/13/04
to Perl Language
No, this isn't a complaint about the number of operators in Perl6. ;-)

Rather I'd just like to throw out an idea (or two) that occurred to me today
somewhere between consciousness and the lack thereof while riding the
Skytrain.

Obviously the Perl6 community has accepted that it's possible to have
variants on operators for things like vectorization. I'm wondering if there
would be any desire, need or room for what I have so far thought of as
"persistent" (or "Energizer Bunny") operators. The closest analogy I can
think of is a spreadsheet formula, where when one cell is altered, any
calculations dependent on the data in that cell are recalculated.

The other thought that grew from these random neurons firing was whether or
not it would be possible to have operators that don't actually do anything
until the data they're dependent upon changes.

my $a = 0;
my $b = 9;
$a later= $b;
print "$a $b\n"
# 0 9
$b = 10;
print "$a $b\n"
# 10 10

Not sure if any of this would be even remotely useful, but this seems to be
as good a place as any to discuss wacky ideas that are of dubious value.
:-)

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.593 / Virus Database: 376 - Release Date: 20/02/2004

Simon Cozens

unread,
Mar 14, 2004, 8:58:20 AM3/14/04
to perl6-l...@perl.org
c_ni...@shaw.ca (Carissa) writes:
> Obviously the Perl6 community has accepted that it's possible to have
> variants on operators for things like vectorization. I'm wondering if there
> would be any desire, need or room for what I have so far thought of as
> "persistent" (or "Energizer Bunny") operators.

Given that this is possible in Perl 5 (see Mark-Jason Dominus' forthcoming
book) I don't doubt it'll be easy to implement as a Perl 6 module with
user-defined operators.

--
Facts do not cease to exist because they are ignored.
-- Aldous Huxley

Luke Palmer

unread,
Mar 14, 2004, 12:40:51 PM3/14/04
to Carissa, Perl Language
Carissa writes:
> The other thought that grew from these random neurons firing was whether or
> not it would be possible to have operators that don't actually do anything
> until the data they're dependent upon changes.

I should hope that would be possible, since it's possible in Perl 5!

See perldoc overload, in the section "Really symbolic calculator" (near
the end).

Luke

Matt Creenan

unread,
Mar 14, 2004, 5:38:33 PM3/14/04
to Luke Palmer, Carissa, Perl Language

It just goes to show.. the perl community has already thought of
everything..

Larry Wall

unread,
Mar 15, 2004, 3:25:57 PM3/15/04
to Perl Language
On Sun, Mar 14, 2004 at 05:38:33PM -0500, Matt Creenan wrote:
: It just goes to show.. the perl community has already thought of
: everything..

Plus a few things beyond everything, if you're into surreal numbers.

Larry

0 new messages