W3C home > Mailing lists > Public > public-appformats@w3.org > February 2007

Re: [XBL] Use of "public"

From: Cameron McCormack <cam@mcc.id.au>
Date: Wed, 14 Feb 2007 13:11:47 +1100
To: public-appformats@w3.org
Message-ID: <20070214021147.GE16068@arc.mcc.id.au>

Hi Ian.

Ian Hickson:
> > I suggest a different property name be used for the public object.

Cameron McCormack:
> Unless I am mistaken, reserved words in ECMAScript don't apply when you 
> are dereferencing an object. so "this.public.x" is fine.

I think you’re thinking of the so-called “contextually reserved
identifiers”.

  >>> o = { 'public': 123 }
  [object Object]
  >>> o.public
  org.mozilla.javascript.EvaluatorException: missing name after
    . operator (System.in#2)

> However, keeping away from reserved words is a good idea, so I've changed 
> 'public' to 'external' and 'private' to 'internal'.

Thanks.

-- 
Cameron McCormack, http://mcc.id.au/
	xmpp:heycam@jabber.org  ▪  ICQ 26955922  ▪  MSN cam@mcc.id.au
Received on Wednesday, 14 February 2007 02:12:04 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:21 GMT