On Mon, Apr 23, 2012 at 3:36 PM, David Herman <[email protected]> wrote:
> I'm much more sympathetic to the idea of having *two* shorter-function
> syntaxes, one optimized for methods and one optimized for non-method
> functions. I understand the concern about bloat, but to me it addresses the
> reality of different contexts in programming, e.g.:
>
> a.map(x => x + 1)
>
> vs
>
> box = {
> _value: 0,
> get: () -> this._value,
> set(v) { this._value = v }
> }
I don't understand this example. What is "set(v) {...}"? It's not a
setter, because it's not associated with a property name. Assuming
you meant "set value(v) {...}", why not just use an ordinary getter as
well?
~TJ
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss