Empty Names (was: Idempotence ad nauseum)

From: Marshall <marshall.spight_at_gmail.com>
Date: 25 Sep 2006 09:45:29 -0700
Message-ID: <1159202729.462347.315120_at_d34g2000cwd.googlegroups.com>

Bob Badour wrote:
> Marshall wrote:
> > Bob Badour wrote:
> >
> >>If an attribute has no name, how are we to refer to it?
> >
> > Do you know the term a "small matter of engineering?" Well,
> > this is a "small matter of syntax." :-)
> >
> > I can think of a few approaches.
> >
> > The first and most comprehensive would be a quoting
> > mechanism for identifiers, such as Haskell uses. This would
> > allow one to, for example, have identifier names with spaces,
> > or empty identifiers, or other otherwise-hard-to-parse
> > identifiers. This would also insulate one from differences
> > in legal identifiers as one crossed language boundaries.
> A name is a name. I don't see how what I said precludes using
> spaces in names.

I didn't think it did. However spaces in names are another thing that, like empty names, are typically hard to parse. I can see some modest value to allowing names to be arbitrary strings; this is possible with an identifier quoting facility.

> > Another approach would be the use of syntactic rules
> > that would allow one to simply omit the name. For
> > example, if name declaration was always of the
> > form "name:type" then the colon could be used as
> > the definitive indication of a declaration, and the name
> > could simply be optional.
> But that doesn't solve the problem of how to refer to the thing with no
> name.

Agreed; this only addresses declaring them. My point 1 however, which I said was the "most comprehensive" addresses all usages of empty identifiers. Points 2 and 3 show how, in limited situations, it might be simpler still.

> > Still another shortcut would be the ability to omit the
> > name when referring to relations with an unnamed
> > attribute:
> >
> > update Table 5 where id = 11; -- sets the unnamed attribute
> Sets what unnamed attribute to what value?

*The* unnamed attribute. As Connor MacLeod says, "there can be only one." And in the above example, the value is 5. The above is a shorthand for the longer:

  update Table set ``=5 where id = 11;

> If we can have one unnamed
> attribute, why not two?

Well, is there a useful distinction between not having a name, and having an empty name? I suspect not. In that case, the empty string is just another string that can be used as an identifier; it doesn't given one a pass to ignore the usual rules such as names being required to be unique.

If there is a useful distinction to be made between the empty name and no name, I don't know what it would be, but it is likely that much of what I'm saying wouldn't apply.

> > Just some ideas. Whether these are good ideas or
> > not depends on the entirety of the laguage design.
> I think you missed my point entirely.

It's entirely possible! And it's possible that I'm talking about something completely different than what you et al are discussing.

Marshall Received on Mon Sep 25 2006 - 18:45:29 CEST

Original text of this message