Jürg Lehni wrote:
On 30 Jun 2010, at 19:13, Brendan Eich wrote:
Some of us old-timers were around at Netscape with Norris Boyd when this was
designed and added to Rhino. It was not added to SpiderMonkey, though, for not
terribly compelling reasons.
Do you remember what the reason wa
On Thu, Jul 1, 2010 at 2:31 PM, Jürg Lehni wrote:
> Brendan, just to clarify:
>
> > the Rhino
> your-constructor-call-with-args+object-initialiser-for-extra-properties
>
> Rhino does not use the object literal following a constructor call as an
> initialiser for extra properties. It just passes i
Brendan, just to clarify:
> the Rhino
> your-constructor-call-with-args+object-initialiser-for-extra-properties
Rhino does not use the object literal following a constructor call as an
initialiser for extra properties. It just passes it to the constructor by
adding it to the end of the list of
On Thu, Jul 1, 2010 at 12:56, Allen Wirfs-Brock
wrote:
> var o = {
> [proto: Foo.prototype]
> private _a: 1,
> get a() { return this._a; },
> set a(a) { this._a = a; }
> };
I like.
--
erik
___
es-discuss mailing list
es-discuss@mozilla
On Behalf Of Erik Arvidsson
> Sent: Thursday, July 01, 2010 12:17 PM
> To: Mark Miller
> Cc: Mark S. Miller; Jürg Lehni; Brendan Eich; es-discuss
> Subject: Re: Syntax Proposal: Allow Java-like Object Literals after
> constructor
> calls to set properties on created objects.
>
A lot of discussion since I last checked in...
I apologize for the harshness. I do agree that Object.create is useful
and I agree that the default values for the property descriptor is
acceptable even though having read only be the default is painful but
consistency trumps that one.
My main issue
On Thu, Jul 1, 2010 at 11:13 AM, Mark S. Miller wrote:
> On Thu, Jul 1, 2010 at 8:24 AM, Brendan Eich wrote:
>
>> On Jul 1, 2010, at 2:13 AM, Mark S. Miller wrote:
>>
>> On Wed, Jun 30, 2010 at 9:09 PM, Brendan Eich wrote:
>>
>>> On Jun 30, 2010, at 7:37 PM, Mark S. Miller wrote:
>>>
>>> And you
On Thu, Jul 1, 2010 at 8:24 AM, Brendan Eich wrote:
> On Jul 1, 2010, at 2:13 AM, Mark S. Miller wrote:
>
> On Wed, Jun 30, 2010 at 9:09 PM, Brendan Eich wrote:
>
>> On Jun 30, 2010, at 7:37 PM, Mark S. Miller wrote:
>>
>> And you're right that attribute-property-missing -> undefined -> false ha
On Jul 1, 2010, at 2:13 AM, Mark S. Miller wrote:
> On Wed, Jun 30, 2010 at 9:09 PM, Brendan Eich wrote:
> On Jun 30, 2010, at 7:37 PM, Mark S. Miller wrote:
>
>> And you're right that attribute-property-missing -> undefined -> false has
>> an effect here. If we had kept the ES3 negative names,
On Wed, Jun 30, 2010 at 9:09 PM, Brendan Eich wrote:
> On Jun 30, 2010, at 7:37 PM, Mark S. Miller wrote:
>
> And you're right that attribute-property-missing -> undefined -> false has
>> an effect here. If we had kept the ES3 negative names, we could have
>> defaulted to false and Erik (I think)
t; default attribute values.
Allen
From: es-discuss-boun...@mozilla.org [mailto:es-discuss-boun...@mozilla.org] On
Behalf Of Maciej Stachowiak
Sent: Wednesday, June 30, 2010 9:30 PM
To: Brendan Eich
Cc: Mark S. Miller; Jürg Lehni; Erik Arvidsson; es-discuss
Subject: Re: Syntax Proposal: Al
On Jun 30, 2010, at 9:09 PM, Brendan Eich wrote:
> On Jun 30, 2010, at 7:37 PM, Mark S. Miller wrote:
>
>> And you're right that attribute-property-missing -> undefined -> false has
>> an effect here. If we had kept the ES3 negative names, we could have
>> defaulted to false and Erik (I think)
On Jun 30, 2010, at 7:37 PM, Mark S. Miller wrote:
> And you're right that attribute-property-missing -> undefined -> false has an
> effect here. If we had kept the ES3 negative names, we could have defaulted
> to false and Erik (I think) would not find Object.create a mistake -- but
> then the
On Wed, Jun 30, 2010 at 4:31 PM, Brendan Eich wrote:
> On Jun 30, 2010, at 4:24 PM, Jürg Lehni wrote:
>
> > On 30 Jun 2010, at 23:32, Brendan Eich wrote:
> >
> >> On Jun 30, 2010, at 2:15 PM, Erik Arvidsson wrote:
> >>
> >>> Sorry, Object.create was a mistake.
> >>
> >> A bit harsh, but my point
alf Of Brendan Eich
> Sent: Wednesday, June 30, 2010 4:31 PM
> To: Jürg Lehni
> Cc: es-discuss; Erik Arvidsson
> Subject: Re: Syntax Proposal: Allow Java-like Object Literals after
> constructor
> calls to set properties on created objects.
>
> On Jun 30, 2010, at 4:24 PM, J
On 30 Jun 2010, at 19:13, Brendan Eich wrote:
> Some of us old-timers were around at Netscape with Norris Boyd when this was
> designed and added to Rhino. It was not added to SpiderMonkey, though, for
> not terribly compelling reasons.
Do you remember what the reason was why this was added to
On Jun 30, 2010, at 4:24 PM, Jürg Lehni wrote:
> On 30 Jun 2010, at 23:32, Brendan Eich wrote:
>
>> On Jun 30, 2010, at 2:15 PM, Erik Arvidsson wrote:
>>
>>> Sorry, Object.create was a mistake.
>>
>> A bit harsh, but my point is not about tone -- it is that the mistake in
>> your view is the d
On 30 Jun 2010, at 23:32, Brendan Eich wrote:
> On Jun 30, 2010, at 2:15 PM, Erik Arvidsson wrote:
>
>> Sorry, Object.create was a mistake.
>
> A bit harsh, but my point is not about tone -- it is that the mistake in your
> view is the default values for missing attributes being false, not true
On 30 Jun 2010, at 18:26, Jeff Watkins wrote:
> Just out of curiosity, what's wrong with the idiomatic Javascript way of
> passing an object literal as your last constructor argument? So your example
> becomes:
>
> var stopButton = new ImageButton(this, {
> image: getImage('
ething other than the default attribute values
> you would have to also add those.
>
> Allen
>
> > -Original Message-
> > From: es-discuss-boun...@mozilla.org [mailto:es-discuss-
> > boun...@mozilla.org] On Behalf Of Jeff Watkins
> > Sent: Wednesday,
> boun...@mozilla.org] On Behalf Of Jeff Watkins
> > Sent: Wednesday, June 30, 2010 10:26 AM
> > To: Jürg Lehni
> > Cc: es-discuss
> > Subject: Re: Syntax Proposal: Allow Java-like Object Literals after
> constructor
> > calls to set properties on created objects.
>
day, June 30, 2010 10:26 AM
> To: Jürg Lehni
> Cc: es-discuss
> Subject: Re: Syntax Proposal: Allow Java-like Object Literals after
> constructor
> calls to set properties on created objects.
>
> Just out of curiosity, what's wrong with the idiomatic Javascript way of
>
On Jun 30, 2010, at 11:13 AM, Brendan Eich wrote:
> So, more work needed to avoid a restricted production, at least. A linking
> operator or keyword ("with" a la functional record update) would help.
(of course I was kidding about "with" :-P)
/be
___
On Jun 30, 2010, at 10:05 AM, Jürg Lehni wrote:
> I am still interested in hearing more feedback on this. Maybe my examples
> were not so clear?
>
> As more real world example, taken from a UI library that I am working with,
> would look like this:
>
> var stopButton = new ImageButton(th
2010/6/30 Jürg Lehni :
> I am still interested in hearing more feedback on this. Maybe my examples
> were not so clear?
> As more real world example, taken from a UI library that I am working with,
> would look like this:
>
> var stopButton = new ImageButton(this) {
> imag
Just out of curiosity, what's wrong with the idiomatic Javascript way of
passing an object literal as your last constructor argument? So your example
becomes:
var stopButton = new ImageButton(this, {
image: getImage('stop.png'),
size: buttonSize,
I am still interested in hearing more feedback on this. Maybe my examples were
not so clear?
As more real world example, taken from a UI library that I am working with,
would look like this:
var stopButton = new ImageButton(this) {
image: getImage('stop.png'),
A lot of people put opening semicolons on a new line, including the
Rhino authors.
How would semicolon insertion in this proposal interact with that
formatting convention?
var runnable = new java.lang.Runnable()
{
run: function ()
{
}
};
2010/6/8 Jürg Lehni :
> This
This simple proposal is inspired by an extension of Rhino that currently allows
to implement its syntax for anonymous Java interface implementation. Here an
example that creates an anonymous class implementing the Runnable interface and
defining the run method in an anonymous object literal that
29 matches
Mail list logo