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

Re: [XBL] Use of "public"

From: Ian Hickson <ian@hixie.ch>
Date: Tue, 13 Feb 2007 20:10:06 +0000 (UTC)
To: Cameron McCormack <cam@mcc.id.au>
Cc: public-appformats@w3.org
Message-ID: <Pine.LNX.4.62.0702131956100.4112@dhalsim.dreamhost.com>
On Wed, 24 Jan 2007, Cameron McCormack wrote:
> 
> Hi.
> 
> In ECMA-262 3rd ed, “public” is a reserved word, which means it will 
> be annoying to refer to the public object from an implementation 
> object’s methods:
> 
>   <implementation>
>     ({
>       xblBindingAttached: function() {
>         this['public'].x = 5;
>       }
>     })
>   </implementation>
> 
> I suggest a different property name be used for the public object.

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

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

Cheers,
-- 
Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'
Received on Tuesday, 13 February 2007 20:10:19 GMT

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