{ Language implementors, please know I'm going to do everything I can to
  make every commit break nothing.  I did pretty well when I made namespace
  [''] stop being [] -- I fixed all the HLLs in the selfsame patch, except
  two bits of code generation in TGE and PGE, which I fixed when they were
  found.  (particle++ for the finding) }

On Fri, Jul 07, 2006 at 12:46:35AM -0700, Allison Randal wrote:
> Chip Salzenberg wrote:
> >Well, I see a lot to like about this, but (and you knew there was a "but"
> >("but" that's my job now :-))), in descending order of difficulty:
> 
> And you do it so well. Thank you. :)

Always a pleasure.

> > * Huffmanizing shouldn't be as big a consideration with PIR/pasm as with
> >   most languages.  Most PIR/pasm is program-generated.
> 
> Agreed, with a note of balance that we also want to avoid the pain of 
> XS. Sometimes you need to poke into the guts of the system, and when you 
> do, you want it to be pleasant to work with, even though it's not fancy.

Point well taken.  Pain is acceptable but not a goal.

> >So here's an illustrative suggestion, which I think is a variant on one of
> >your also-rans, albeit one that leaves the common HLL case unmarked:
> >
> >      .HLL 'perl5', perl5_group
> >      .namespace ['Foo']
> >
> >      $P0 = get_cur_global 'x'              # ['perl5';'Foo';'x']
> >      $P0 = get_cur_global ['Bar'], 'x'     # ['perl5';'Foo';'Bar';'x']
> >
> >      $P0 = get_global 'x'                  # ['perl5';'x']
> >      $P0 = get_global ['Corge'], 'x'       # ['perl5';'Corge';'x']
> >
> >      $P0 = get_abs_global 'x'              # ['x']
> >      $P0 = get_abs_global ['parrot'], 'x'  # ['parrot';'x']
> 
> This is non-evil. :)

<grin/>

> I would rename 'get_cur_global' to 'get_global'. The selected namespace 
> indicates that most of the code belongs in that namespace, so it's 
> likely that most of the variables do too. (There are variations, but 
> that's at least the common case.)

Works for me.  And that is the current meaning of two-parameter find_global,
so it's not a stretch.

> Then, what to call the HLL root access opcodes... perhaps 'get_rel_global'
> (for relative root)?

Hrm.  Relative is the usual apposite to absolute, but we have a three-way
logic here, so appositives don't really work.  I think that "hll" is the
best I can think of, and given the existing ".HLL" directive, its meaning
is immediately clear:

     .HLL 'perl5', perl5_group
     .namespace ['Foo']

     $P0 = get_global 'x'                  # ['perl5';'Foo';'x']
     $P0 = get_global ['Bar'], 'x'         # ['perl5';'Foo';'Bar';'x']

     $P0 = get_hll_global 'x'              # ['perl5';'x']
     $P0 = get_hll_global ['Corge'], 'x'   # ['perl5';'Corge';'x']

     $P0 = get_abs_global 'x'              # ['x']
     $P0 = get_abs_global ['parrot'], 'x'  # ['parrot';'x']

Seems to me that we should have get_namespace patterned just alike:

     .HLL 'perl5', perl5_group
     .namespace ['Foo']

     $P0 = get_namespace                   # ['perl5';'Foo']
     $P0 = get_namespace ['Bar']           # ['perl5';'Foo';'Bar']

     $P0 = get_hll_namespace               # ['perl5']
     $P0 = get_hll_namespace ['Corge']     # ['perl5';'Corge']

     $P0 = get_abs_namespace               # []          :-)
     $P0 = get_abs_namespace ['parrot']    # ['parrot']

I'm still not entirely happy with "abs", but I can live with it, especially
since its use should be quite rare.
-- 
Chip Salzenberg <[EMAIL PROTECTED]>

Reply via email to