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 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

Reply via email to