develooper Front page | perl.perl6.internals | Postings from August 2004

Re: Something to ponder

Thread Previous | Thread Next
From:
Aaron Sherman
Date:
August 18, 2004 14:29
Subject:
Re: Something to ponder
Message ID:
1092864562.16672.564.camel@pps
On Wed, 2004-08-18 at 15:57, Felix Gallo wrote:
> Dan writes:
> >     sub foo :come_from('+', int, int) {}
> 
> One problem with MMD in general, and return specifically, is
> 'what happens if multiple M match the same D requirements?
> i.e., 

That's a question, not a problem. It's easy to answer questions ;-) I
assume we're talking about first-to-match only, but I haven't looked at
the code. You could always go look at the MMD code in the Parrot
source...

However, I'm not sure what Dan meant there. Perhaps he mis-spoke, or
perhaps I don't understand this at all... that's a calling signature,
not a return signature. I would expect:

	sub foo :come_from('+', int) {...} # Handle integer returns
	sub foo :come_from('+', num) {...} # Handle floating point

That's very different from a come_from that would operate on the calling
signature (which needs return continuations too, but differently).

Or did we just switch to talking about something different while I
wasn't looking?

> If the answer is 'all get executed', this could be useful for
> any languages interested in implementing aspect-oriented programming
> as a first class language feature, e.g.

You can build one from the other trivially, though and that doesn't
affect, in the slightest, how "first class" the feature is in a language
that uses Parrot, only how interchangeable it is between languages.

That, of course, dodges the question of how much aspect oriented
programming is an attempt to being the beauty of Intercal to ugly,
"usable" programming languages....

> sub debug_log :come_from(:benchmark_me) { 
>     my $function_name = shift;
>     print STDERR "debug: $function_name at " . time() . "\n";
> }

Ok, this is starting to look like people speaking seriously about using
Intercal's COME FROM (http://c2.com/cgi/wiki?ComeFrom)... can we just
step back and take a deep breath of AIR please? Seriously, this is
starting to creep me out.

-- 
☎ 781-324-3772
✉ ajs@ajs.com
☷ http://www.ajs.com/~ajs


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About