Google Groups unterstützt keine neuen Usenet-Beiträge oder ‑Abos mehr. Bisherige Inhalte sind weiterhin sichtbar.

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

5 Aufrufe
Direkt zur ersten ungelesenen Nachricht

Allison Randal

ungelesen,
13.01.2007, 16:31:2213.01.07
an 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

ungelesen,
14.01.2007, 18:21:2914.01.07
an 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 neue Nachrichten