Allison Randal wrote:
Klaas-Jan Stol wrote:
Hello,
I have a short and simple question w.r.t. syntax for constructing new
objects for the architect :-)
Currently, it's done through:
new P0, .Integer
or in PIR:
$P0 = new Integer # or .Integer
I thought to have read somewhere this will be changed into something
like this:
$P0 = Integer.new()
The two candidates currently are:
$P0 = get_class "HLLClass"
$P1 = $P0.new()
Or:
$P0 = get_hll_namespace
$P1 = $P0.find_class("HLLClass")
$P2 = $P1.new()
IIUC, instead of create a new object (either a built-in PMC or an OO
object) in 1 instruction, it should now be done in 2?
Or, can I also write:
$P0 = Integer.new() # create new Integer PMC object
$P1 = Hash.new() # create new Hash PMC object
kjs