Chip Salzenberg wrote:
On Thu, Jul 06, 2006 at 01:21:08AM -0700, Allison Randal wrote:
The problem is really that we're trying to simultaneously a) refer to the root HLL namespace directly, and b) pretend that it doesn't exist.

I don't think (b) is quite true.  It's more that we're avoiding explicit
re-coding of a known bit of environmental information, as in "the first
floor of this building" rather than "the first floor of 123 main street".

That's another good way of phrasing it. It's essentially the linguistic problem of being able to refer to something both by its full name and by the pronoun "it". (Otherwise known as "topic".) Only, currently "it" isn't represented by a word. There are natural languages with zero-length pronouns, but they generally compensate by marking the verb with enough information to disambiguate. And when that gets unclear, they throw in the full name again.

...I was hoping you'd say something like, "Oh
yeah, we're gonna need zero-length keys anyway for Perl 6".  What is the
parameter to operator:postcircumfix [] when a user says

   @array.[]

?

Various HLLs will assign some meaning to a null key. But the semantics of this isn't keyed access. The HLL is just using a bit of unused syntax to mean "return an empty list", or "return null", or "return all the elements of the array as a list", or whatever else they decide to use it for. It's up to the HLL compiler to distill the syntax down to meaningful semantics.

Allison

Reply via email to