Am Montag, 13. November 2006 03:56 schrieb Bob Rogers:
> +There are two techniques for implementing dynamic binding.  These are
> +traditionally called deep binding and shallow binding [2].

Can you please consider the impacts of a third variant using STM, which is 
already implemented:

$ cat stm.pir
.sub main :main
    $P0 = new .Integer
    $P0 = 42
    $P1 = new .STMRef, $P0    # localalize $P0
    stm_start                 # 2nd line 
    $P1 = 45
    print $P1
    print "\n"
    stm_abort                 # un-local ;)
    print $P1
    print "\n"
.end

$ ./parrot stm.pir
45
42

Thanks,
leo

Reply via email to