Re: extending built-in classes

2018-09-22 Thread Curt Tilmes
On Sat, Sep 22, 2018 at 5:30 PM Larry Wall wrote: > On Sat, Sep 22, 2018 at 11:40:13AM -0700, Joseph Brenner wrote: > : Sounds good, thanks. > > Well, yes, *sounds* good. :-) > > Monkey patching is allowed but discouraged in Perl 6, because Ruby. > Mixed in roles: https://docs.perl6.org/lan

Re: extending built-in classes

2018-09-22 Thread Larry Wall
On Sat, Sep 22, 2018 at 11:40:13AM -0700, Joseph Brenner wrote: : Sounds good, thanks. Well, yes, *sounds* good. :-) Monkey patching is allowed but discouraged in Perl 6, because Ruby. Larry

Re: extending built-in classes

2018-09-22 Thread Joseph Brenner
Sounds good, thanks. (I see the term is "augment"-- someone told me it was "extend", and I couldn't find that anywhere.) On Sat, Sep 22, 2018 at 11:35 AM, Brandon Allbery wrote: > "use MONKEY-TYPING;" and then you have "augment" https://docs.perl6. > org/syntax/augment.html > > On Sat, Sep 22,

Re: extending built-in classes

2018-09-22 Thread Brandon Allbery
"use MONKEY-TYPING;" and then you have "augment" https://docs.perl6.org/syntax/augment.html On Sat, Sep 22, 2018 at 2:33 PM Joseph Brenner wrote: > I was just wondering if there's any way to extend an existing > class in perl 6. I'd like to be able to do things like drop > a custom debugging me

extending built-in classes

2018-09-22 Thread Joseph Brenner
I was just wondering if there's any way to extend an existing class in perl 6. I'd like to be able to do things like drop a custom debugging method in Any that would then be available on everything. Note: I'm talking about adding something to an existing class ("monkeypatching") as opposed to sub