[VM-dev] Names versus attribute numbers (was: Re: adding external
plugins to Squeak 4.2 on the Mac)
David T. Lewis
lewis at mail.msen.com
Wed Jul 20 02:40:56 UTC 2011
On Tue, Jul 19, 2011 at 04:12:39PM +0200, Igor Stasenko wrote:
> On 19 July 2011 09:55, Stefan Marr <squeak at stefan-marr.de> wrote:
> > Hi:
> > On 19/07/11 02:59, Eliot Miranda wrote:
> >> How about a command-line argument that prints/answers a system attribute?
> >> ??The system attributes are just strings, so they can be printed without
> >> loading an image etc. ??It won't look as nice as myvm -printProxyversion,
> >> it'll look like myvm -sysattr 1010 -sysattr 1011, but it'll be general.
> > Since I am currently again frustrated with 'someone else system', please
> > keep in mind that 'Sunday programmers' like me will understand
> > -printProxyversion without needing to search for it on the internet, but
> > sysattr 1011 is not directly useful, except if the command-line would also
> > provide a mechanism to translate that code to something understandable.
> Same for me. I don't see why it needs to be obscure, if we can use
> symbolic names instead of numbers.
> After all, we making these interfaces for humans, not for machine.
> We have different positions on that with Eliot:
> Eliot adding new numbers by extending existing interface (to access
> the system attributes).
> While i think that it would be better to have primitives with
> corresponding names, which explaining what attribute value it
> returns and what it serves for.
> IMO, saving developer's time is much better than saving few bytes in
> VM binary (because of using numbers instead of name).
I also prefer the explicit names, either named primitives or
command line parameters. To me the rationale is that system
attributes or vm parameters require an coordinated effort to
keep track of the assignments. That's fine for a small number
of developers, but it is not scalable as we move forward with
larger numbers of people doing creative development of VMs.
There are a few things that really do need to be coordinated
between the various VM projects, such as image format number
assignments to support new VMs and object memories. But this
kind of coordination is difficult to maintain, and requiring
agreement on trivial matters (such as "what is the meaning of
attribute nnn?") can inhibit progress for people trying to
advance their own work without waiting for agreement from
So in my view it is a good thing to use explicit names, even
if it does have some technical disadvantages.
More information about the Vm-dev