Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

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

4 views
Skip to first unread message

Allison Randal

unread,
Jan 13, 2007, 4:31:22 PM1/13/07
to bugs-bi...@rt.perl.org
# 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 an opcode on a type ID.

$P0 = get_class "HLLClass"
$P1 = $P0.new()

Or even:

$P0 = get_hll_namespace
$P1 = $P0.find_class("HLLClass")
$P2 = $P1.new()

(Though the first could be shorthand for the second that assumes the
current selected namespace.)

Allison

Kevin Tew

unread,
Jan 14, 2007, 6:21:29 PM1/14/07
to perl6-i...@perl.org
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

0 new messages