just be an instance of PGE::Match that
knows how to deal with the 'new' method (either because it's a
method in the class or because it's specifically composed into
the protoobject).
Most of the compiler tools are being created based upon this
model of object creation -- i.e., the
ect to ultimately aim for is something like:
$P0 = get_hll_global [ 'PGE' ], 'Match'
(mob, pos, target, mfrom, pos) = $P0.'new'(mob, adverbs :flat :named)
In this example it doesn't matter if $P0 is the actual class
object -- it can just be an instan
se instance methods and
class methods are sharply distinguished. (I get a signature mismatch
error, because the 'new' method in Class only takes flat, named
arguments, with no positional arguments.)
I can think of several ways to work with this. The simplest is to have
PGE stand
From PDD 15:
$P1 = $P2.new( 'myattrib' => "Foo" )
Create a new instance object from the class object. It takes an optional,
slurpy, named list of attributes and values to initialize the object.
Passing attribute names that weren't declared in the class is an error.
Is this functional yet
I like it. I have been thinking of suggesting the same thing.
Currently, hackery is used to get the new opcode to instantiate
objects. If classes become objects as well, the hackery breaks down.
Kevin
Allison Randal (via RT) wrote:
# New Ticket Created by Allison Randal
# Please include the s
# New Ticket Created by Allison Randal
# Please include the string: [perl #41266]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt3/Ticket/Display.html?id=41266 >
Consider object instantiation as a method call on a class object, rather
than an opco
At 1:16 PM -0700 4/4/04, chromatic wrote:
On Sun, 2004-04-04 at 10:17, Leopold Toetsch wrote:
.sub __init method
is AFAIK the constructor. It gets called automatically for all parent
classes and the class itself and is the best place to put attributes for
objects in place and set these to the
Chromatic <[EMAIL PROTECTED]> wrote:
> On Sun, 2004-04-04 at 10:17, Leopold Toetsch wrote:
>> .sub __init method
> I personally want to pass arguments to the initializer ("constructor"
> really isn't the right term). I expect HLLs will want to do the same.
There isn't yet an official way to ach
On Sun, 2004-04-04 at 10:17, Leopold Toetsch wrote:
> .sub __init method
>
> is AFAIK the constructor. It gets called automatically for all parent
> classes and the class itself and is the best place to put attributes for
> objects in place and set these to their default values.
I personally wan
> "C" == Chris <[EMAIL PROTECTED]> writes:
C> How about some variation on "create"?
just please make sure it has the missing 'e'. :)
uri
--
Uri Guttman -- [EMAIL PROTECTED] http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and C
How about some variation on "create"?
---
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
Jens Rieks <[EMAIL PROTECTED]> wrote:
> Hi,
> Chromatic and I are unsure what the best name for a constructor method is.
.sub __init method
is AFAIK the constructor. It gets called automatically for all parent
classes and the class itself and is the best place to put attributes for
objects in pl
Hi,
Chromatic and I are unsure what the best name for a constructor method is.
Leo, is it time-consuming to fix IMCC in order to make it possible to use
"new" as a method name?
Is there something special to consider to avoid problems regarding several
languages? Is BUILD a good name for a non
# New Ticket Created by logo
# Please include the string: [perl #21378]
# in the subject line of all future correspondence about this issue.
# http://rt.perl.org/rt2/Ticket/Display.html?id=21378 >
I was trying to install the latest version of libwww-perl with my 5.8.0
installation of perl.
14 matches
Mail list logo