Piers Cawley wrote:
Here's a rubyish idiom:
my &old_behaviour := &function;
&function := sub { try_some_stuff || &old_behaviour }
Except, with binding it doesn't work like that, you end up with an infinite
loop.
But this version *should* work correctly:
# Bind the name '&old_behav
Hi,
Juerd convolution.nl> writes:
> Piers Cawley skribis 2005-06-23 15:30 (+0100):
> > Brent 'Dax' Royal-Gordon gmail.com> writes:
> > > As I've said before, Perl supports `alias`--it's just spelled `:=`.
> > Here's a rubyish idiom:
> > my &old_behaviour := &function;
> > &function :
Piers Cawley skribis 2005-06-23 15:30 (+0100):
> Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes:
> > As I've said before, Perl supports `alias`--it's just spelled `:=`.
> Here's a rubyish idiom:
> my &old_behaviour := &function;
> &function := sub { try_some_stuff || &old_behaviour }
> Exc
Brent 'Dax' Royal-Gordon <[EMAIL PROTECTED]> writes:
> As I've said before, Perl supports `alias`--it's just spelled `:=`.
Here's a rubyish idiom:
my &old_behaviour := &function;
&function := sub { try_some_stuff || &old_behaviour }
Except, with binding it doesn't work like that, you end up
Hi,
"&kilobytes := &kilobyte;" will not work for you (try it), because you
have to declare the "variable" kilobytes - in the default strict mode.
But you can't say for ex. "my &kilobytes", if you want to export it.
So you say `our &kilobytes ::= &kilobyte` (or `:=`, you still haven't
said if a
On 6/20/05, BÁRTHÁZI András <[EMAIL PROTECTED]> wrote:
> Hi,
>
> >>- in natural languages, synonims are very often - alias is a synonim
> >
> > Perl is modeled on natural languages, but that doesn't mean it is one.
> > At its core, Perl is a limited, artificial language being explicitly
> > desig
Hi,
- in natural languages, synonims are very often - alias is a synonim
Perl is modeled on natural languages, but that doesn't mean it is one.
At its core, Perl is a limited, artificial language being explicitly
designed with certain goals. One of those goals is that it should be
as small a
On 6/20/05, BÁRTHÁZI András <[EMAIL PROTECTED]> wrote:
> - in natural languages, synonims are very often - alias is a synonim
Perl is modeled on natural languages, but that doesn't mean it is one.
At its core, Perl is a limited, artificial language being explicitly
designed with certain goals. O
On Mon, 20 Jun 2005, BÁRTHÁZI András wrote:
Hi,
I'm still interested in, why "alias" wouldn't be a native Perl 6 term?
I think, there are several reasons for "alias":
I am not arguing against alias, but just wanted to point out something.
- in Perl 6, currently there's no way to create a r
Hi,
I'm still interested in, why "alias" wouldn't be a native Perl 6 term?
I think, there are several reasons for "alias":
- in natural languages, synonims are very often - alias is a synonim
- in Perl 6, currently there's no way to create a reference to a
variable, _with the context of the v
Hi,
Carl Franks wrote:
: alias newlines, newline;
Isn't it possible to add a Role to the relevant Class, which specifies
that is 'handles' the method name you want as an alias?
If it's possible, it would be fine for me in this particular case. Is it
possible?
Anyway, IMHO this alias fun
> : alias newlines, newline;
Isn't it possible to add a Role to the relevant Class, which specifies
that is 'handles' the method name you want as an alias?
Carl
Larry,
You can always write a macro that does that.
[...]
That won't work on a method name anyway unless you do it in the
dispatch class.
[...]
You'll have to write your own macro if you want to do that.
As I understood, you wrote down, how I can workaround it with macros,
and why it wouldn
On Tue, Jun 14, 2005 at 02:06:37PM +0200, BÁRTHÁZI András wrote:
: Hi,
:
: As I know, for binding, you can use the := operator, and just this:
:
: $a := $b;
:
: I would like to make a proposal, based on Ruby[1]:
:
: alias $a, $b;
You can always write a macro that does that.
: It's a fun:
14 matches
Mail list logo