manager = function(object) {
this.init.apply(this, arguments);
}
manager.prototype = new function() {
/* Private Properties */
var gui;
var obj;
/* Constructor */
this.init = function(object) {
gui = new Gui();
obj = object;
Use-cases, please -- aesthetics come after functionality and only if
the functionality is there.
You haven't demonstrated why you want accessors on the lexical (i.e.,
private part of the) scope chain.
/be
On Nov 4, 2009, at 5:50 AM, memo...@googlemail.com wrote:
So if you agree with me u
So if you agree with me upon the ugliness, you'll also agree with me
that it would be better to find a sweeter way.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA256
memo...@googlemail.com wrote:
> 2009/11/2 Brendan Eich :
>
>> Defining accessors on an activation object is nasty,
>> If you want private getters and setters, you can put them in an object
>> denoted by a private var:
>
> So you prefer ugly solution
2009/11/2 memo...@googlemail.com :
> 2009/11/2 Brendan Eich :
>>Defining accessors on an activation object is nasty,
>>If you want private getters and setters, you can put them in an object
>>denoted by a private var:
> So you prefer ugly solutions, because the others are nasty?
>
>> The upshot fo
On Nov 2, 2009, at 3:05 PM, memo...@googlemail.com wrote:
2009/11/2 Brendan Eich :
Defining accessors on an activation object is nasty,
If you want private getters and setters, you can put them in an
object denoted by a private var:
So you prefer ugly solutions, because the others are nasty?
2009/11/2 Brendan Eich :
>Defining accessors on an activation object is nasty,
>If you want private getters and setters, you can put them in an object denoted
>by a private var:
So you prefer ugly solutions, because the others are nasty?
> The upshot for memolus is that with is already a deoptimi
The upshot for memolus is that with is already a deoptimizer that
introduces non-lexical names onto the scope chain. These can be
gettters and setters and have arbitrary effects. My point remains that
adding getters and setters to activations, which are modeled lexically
in the absence of e
2009/11/2 Brendan Eich :
> On Nov 2, 2009, at 10:47 AM, Mike Samuel wrote:
>
>> What do getters and setters do around with?
>>
>> var flipFlop;
>> with ({ get test: function () { return (flipFlop = !flipFlop) ?
>> 'flip' : 'flop'; } }) {
>> for (var i = 0; i < 10; ++i) { alert(test); }
>> }
>
On Nov 2, 2009, at 10:47 AM, Mike Samuel wrote:
What do getters and setters do around with?
var flipFlop;
with ({ get test: function () { return (flipFlop = !flipFlop) ?
'flip' : 'flop'; } }) {
for (var i = 0; i < 10; ++i) { alert(test); }
}
The with block invokes NewObjectEnvironmen
What do getters and setters do around with?
var flipFlop;
with ({ get test: function () { return (flipFlop = !flipFlop) ?
'flip' : 'flop'; } }) {
for (var i = 0; i < 10; ++i) { alert(test); }
}
The with block invokes NewObjectEnvironment with O being the binding object.
But I'm uncl
On Nov 2, 2009, at 2:34 AM, memo...@googlemail.com wrote:
I like to use getter and setter on private objects (e.g. "var test").
That is very unclear; I'm guessing you mean getters and setters
instead of plain variables in closures used to store private data.
I didn't found any way to do
I like to use getter and setter on private objects (e.g. "var test").
I didn't found any way to do this. I don't need sth. like
Object.definePrivateProperty, because I only want to set getter and
setter when I define the private object.
Example proposal:
var test;
get test = function() { [..] };
s
13 matches
Mail list logo