Chip Salzenberg <[EMAIL PROTECTED]> wrote:
{ 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) }
chip++ :-)
On Fri, Jul 07, 2006 at 12:46:35AM -0700, Allison Randal wrote:
> Chip Salzenberg wrote:
> > * 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.
Good points.
> >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.
Works for me too. I'm not sure that I like the rename (I can't
decide), but the name itself doesn't matter much. The new opcodes (the
presence of get_cur_global) may actually make things easier for Tcl if
we ever compile to 100% inlined PIR.
This is a different route than I was trying to take us, but it should
be almost functionally equivalent, so I'm happy with it.
--
matt diephouse
http://matt.diephouse.com