[perl #128010] [BUG] reference to outside function prevents role instantiation

2016-04-27 Thread via RT
# New Ticket Created by grond...@yahoo.fr # Please include the string: [perl #128010] # in the subject line of all future correspondence about this issue. # https://rt.perl.org/Ticket/Display.html?id=128010 > In file A.pm6 :unit class A ; our sub f {} In file B.pm6 :unit role B ;

[perl #109880] [BUG] Something is wrong with instantiation of generic roles and typed attributes in Rakudo

2015-01-25 Thread Christian Bartolomaeus via RT
As a status update: This behaves differently now. $ perl6-m -e 'role Foo[::T] { has T @.a = [T] }; class Bar {}; say Foo[Bar].new.a[0]' Type check failed in assignment to '@!a'; expected 'Bar' but got 'Array' in method REIFY at src/gen/m-CORE.setting:9935 in method reify at

[perl #109880] [BUG] Something is wrong with instantiation of generic roles and typed attributes in Rakudo

2012-02-05 Thread Carl Mäsak
instantiation failure. * masak submits rakudobug

[perl #57228] Instantiation an object last in a program fails in rakudo

2008-07-23 Thread Carl Mäsak
# New Ticket Created by Carl Mäsak # Please include the string: [perl #57228] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=57228 Whereas $ perl6 -e 'class A {}; my A $a .= new; 1' $ perl6 -e 'class A {}; my A $a =

[perl #41266] [PDD] object instantiation, new method

2007-01-14 Thread via RT
# New Ticket Created by Allison Randal # Please include the string: [perl #41266] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41266 Consider object instantiation as a method call on a class object, rather than

Re: [perl #41266] [PDD] object instantiation, new method

2007-01-14 Thread Kevin Tew
the string: [perl #41266] # in the subject line of all future correspondence about this issue. # URL: http://rt.perl.org/rt3/Ticket/Display.html?id=41266 Consider object instantiation as a method call on a class object, rather than an opcode on a type ID. $P0 = get_class HLLClass $P1

MakeObject - an Object Instantiation Experiment

2006-10-10 Thread chromatic
Hi all, Here's an experiment I worked on yesterday to make creating objects a little easier from PIR. The MakeObject library allows you to create an object by passing its name (or, more usefully, a Key PMC) and a set of named arguments to the initializer. It then calls the class's BUILDALL()

Re: MakeObject - an Object Instantiation Experiment

2006-10-10 Thread chromatic
On Tuesday 10 October 2006 12:23, Leopold Toetsch wrote: PPS: new opcode variant count is 20 now. I can imagine that we just have these: new P0, .Class # plain form new P0, .Class, args new P0, [class], args Is args a PMC (Hash) or a list of named arguments? Creating

Re: MakeObject - an Object Instantiation Experiment

2006-10-10 Thread Leopold Toetsch
have with object instantiation. PPS: new opcode variant count is 20 now. I can imagine that we just have these: new P0, .Class # plain form new P0, .Class, args new P0, [class], args leo

Re: MakeObject - an Object Instantiation Experiment

2006-10-10 Thread Leopold Toetsch
Am Dienstag, 10. Oktober 2006 21:32 schrieb chromatic:   new P0, [class], args Is args a PMC (Hash) or a list of named arguments?  Creating a Hash for every initializer is a real bummer in PIR. As said, args ought to be everything conforming to current calling conventions. o = new

Re: PMC instantiation

2004-09-07 Thread Dan Sugalski
At 11:27 AM +0200 9/3/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: At 12:16 PM +0200 8/31/04, Leopold Toetsch wrote: Pclass = getclass, Foo Pobjnew = Pclass.__new(args) # Pnew is an OUT argument and that be special-cased to call VTABLE_new according to calling

Re: PMC instantiation

2004-09-07 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: At 11:27 AM +0200 9/3/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: At 12:16 PM +0200 8/31/04, Leopold Toetsch wrote: Pclass = getclass, Foo Pobjnew = Pclass.__new(args) # Pnew is an OUT argument and that be special-cased to

Re: PMC instantiation

2004-09-03 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: At 12:16 PM +0200 8/31/04, Leopold Toetsch wrote: Pclass = getclass, Foo Pobjnew = Pclass.__new(args) # Pnew is an OUT argument and that be special-cased to call VTABLE_new according to calling conventions. Still don't like __new, but otherwise

Re: PMC instantiation

2004-08-31 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: Add a vtable slot to the PMC vtable inv_init (or something like that, the name's not that big a deal), vtable-new and __new? ... define it as an invokable method taking parameters as the current calling conventions, and be done with it. Basically we

Re: PMC instantiation

2004-08-31 Thread Dan Sugalski
At 12:16 PM +0200 8/31/04, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: Add a vtable slot to the PMC vtable inv_init (or something like that, the name's not that big a deal), vtable-new and __new? Those are a little too similarly named. We should have something more distinct,

PMC instantiation

2004-08-26 Thread Leopold Toetsch
The current scheme of PMC instantiation works mostly fine for scalars and other simple types, but it's a bit limited. It allows only one initializer (see init_pmc in docs/pdds/pdd02_vtables.pod). Further PMC and real object instantiation shouldn't differ in syntax. Here is a summary what we

Re: Instantiation

2004-08-24 Thread Simon Cozens
[EMAIL PROTECTED] (Aaron Sherman) writes: my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new(blah); Wow, that's pretty amazing... uh... I think I'd just prefer to do it the old fashioned way. If my suggestion was really that horrific, I withdraw the question. These days, to me,

Instantiation

2004-08-23 Thread Aaron Sherman
I was thinking about the case where you use a module, only to define a class that you then instantiate like this: use Some::Module::That::Defines::A::Class; our Some::Module::That::Defines::A::Class $foo := new; and I keep thinking that that's too redundant. It's not so much that

Re: Instantiation

2004-08-23 Thread Juerd
Aaron Sherman skribis 2004-08-23 12:53 (-0400): use Some::Module::That::Defines::A::Class; our Some::Module::That::Defines::A::Class $foo := new; and I keep thinking that that's too redundant (...) So, I was wondering about a synonym, like: uses

Re: Instantiation

2004-08-23 Thread Paul Seamons
So, I was wondering about a synonym, like: uses Some::Module::That::Defines::A::Class $foo; Well if the long name is the problem: use Some::Module::That::Defines::A::Class as Foo; my Foo $obj .= new; # OR # require Some::Module::That::Defines::A::Class; import

Re: Instantiation

2004-08-23 Thread Matthew Walton
Aaron Sherman wrote: I was thinking about the case where you use a module, only to define a class that you then instantiate like this: use Some::Module::That::Defines::A::Class; our Some::Module::That::Defines::A::Class $foo := new; and I keep thinking that that's too redundant.

Re: Instantiation

2004-08-23 Thread Ingo Blechschmidt
Hello, Aaron Sherman wrote: I was thinking about the case where you use a module, only to define a class that you then instantiate like this: [ snip ] So, I was wondering about a synonym, like: uses Some::Module::That::Defines::A::Class $foo; is $foo implicitely declared as our or my (or

Re: Instantiation

2004-08-23 Thread Sean O'Rourke
At Mon, 23 Aug 2004 15:51:00 -0400, [EMAIL PROTECTED] (Aaron Sherman) wrote: On Mon, 2004-08-23 at 15:19, Paul Seamons wrote: So, I was wondering about a synonym, like: uses Some::Module::That::Defines::A::Class $foo; Well if the long name is the problem: use

Re: Instantiation

2004-08-23 Thread Dave Whipp
Sean O'Rourke [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] my $x = (use Some::Module::That::Defines::A::Class).new(blah); how about some variation on my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new(blah); Dave.

Re: Instantiation

2004-08-23 Thread Aaron Sherman
Dave Whipp wrote: Sean O'Rourke [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] my $x = (use Some::Module::That::Defines::A::Class).new(blah); how about some variation on my $x = Some::Module::That::Defines::A::Class.AUTOLOAD.new(blah); Wow, that's pretty amazing... uh...

Object instantiation

2003-10-21 Thread Dan Sugalski
After thinking about this a bit, it became glaringly obvious that the right way to instantiate an object for class Foo is to do: new P5, .Foo Or whatever the constant value assigned to the Foo class upon its creation is. When a class is created, it should be assigned a number, and for most

Re: Object instantiation

2003-10-21 Thread Leopold Toetsch
Dan Sugalski [EMAIL PROTECTED] wrote: After thinking about this a bit, it became glaringly obvious that the right way to instantiate an object for class Foo is to do: new P5, .Foo Or whatever the constant value assigned to the Foo class upon its creation is. When a class is created, it

Re: Object instantiation

2003-10-21 Thread Dan Sugalski
On Tue, 21 Oct 2003, Leopold Toetsch wrote: Dan Sugalski [EMAIL PROTECTED] wrote: After thinking about this a bit, it became glaringly obvious that the right way to instantiate an object for class Foo is to do: new P5, .Foo Or whatever the constant value assigned to the Foo class

Re: Object instantiation

2003-10-21 Thread Melvin Smith
To: [EMAIL PROTECTED] (Dan Sugalski) cc: [EMAIL PROTECTED] Subject:Re: Object instantiation Dan Sugalski [EMAIL PROTECTED] wrote: After thinking about this a bit, it became glaringly obvious that the right way to instantiate an object for class Foo is to do: new P5

Re: Object instantiation

2003-10-21 Thread Jeff Clites
On Oct 21, 2003, at 7:14 AM, Dan Sugalski wrote: After thinking about this a bit, it became glaringly obvious that the right way to instantiate an object for class Foo is to do: new P5, .Foo Or whatever the constant value assigned to the Foo class upon its creation is. When a class is

Re: Class instantiation and creation

2003-06-10 Thread Gopal V
If memory serves me right, Dan Sugalski wrote: It's possible to just go ahead and do it *all* at runtime, and have no compile time component at all--just a series of newclass, addparent, addattribute ops, assuming those are the op names we go with. Classes just get created at code

Class instantiation and creation

2003-06-09 Thread Dan Sugalski
Well, we can make objects and we can call methods on objects (at least the interface is specified, if not actually implemented) but actually building classes to make objects out of is still unspecified. So, time to remedy that, after which I hope we can build at least a simple ParrotObject

Re: Class instantiation and creation

2003-06-09 Thread Mark A. Biggar
Dan Sugalski wrote: Well, we can make objects and we can call methods on objects (at least the interface is specified, if not actually implemented) but actually building classes to make objects out of is still unspecified. So, time to remedy that, after which I hope we can build at least a

Re: Class instantiation and creation

2003-06-09 Thread Matt Fowles
Dan Sugalski wrote: The issue is metadata. How do you declare a class' inheritance hierarchy, its interfaces, its attributes, and its type? (At the very least, there's probably more) I can see the following . 1) A class subclasses a single parent. 2) A class subclasses a single parent and adds

Re: Object Instantiation

2002-10-15 Thread Peter Haworth
On Fri, 11 Oct 2002 14:05:30 -0700, Michael Lazzaro wrote: Maybe postfix ! on a class name means to autoinstantiate an object of the named class only if/when first accessed: our FancyCache $cache; # declare, but leave undef our FancyCache! $cache;

Re: Object Instantiation

2002-10-11 Thread Michael Lazzaro
On Thursday, October 10, 2002, at 05:11 PM, Larry Wall wrote: my MyClass $obj = .new; snip my new MyClass $obj; Thanks for the clarification. I like those two OK, personally. If I were chained to one of those, I wouldn't chew my leg off. Tying it together with the other thread

Re: Object Instantiation (Was: Re: [ANNOUNCE] Perl6 OO Cookbook, v0.1)

2002-10-10 Thread Larry Wall
$obj is MyClass; : : should declare a variable of type MyClass. (You're right, it shouldn't : autoviv.) So what's the simplest syntax for typing + instantiation, : together? Dunno, maybe : : my $obj is MyClass .= new; : : is it, but still I'm hoping for an alternative that is easier