Re: Object.observe and observing "computed properties"

2012-09-19 Thread Brendan Eich
Rafael Weinstein wrote: [Just to be clear: I*don't* think it makes sense to include reads in the set of changeRecords generated by Object.observe() at this point] Indeed -- one might want to rename these things from "changeRecords" to something else, at least! But beyond the name, reads dom

Re: Object.observe and observing "computed properties"

2012-09-19 Thread Rafael Weinstein
n't require language support; also doesn't even >> >> require Object.observe since you might as well also replace >> setters with ones that trigger notification on change >> o Cons: very intrusive - permanently modifies the developer's

Re: Object.observe and observing "computed properties"

2012-09-19 Thread Brendan Eich
t;> wrote: *From:* Alex Russell <mailto:slightly...@google.com> *Sent:* Thursday, August 30, 2012 7:44 PM *To:* ste...@stevensanderson.com <mailto:ste...@stevensanderson.com> *Cc:* es-discuss@mozilla.org <mailto:es-discuss@mozilla.org> *Subject:* Re: Objec

Re: Object.observe and observing "computed properties"

2012-09-19 Thread Steve Sanderson
: very intrusive - permanently modifies the developer's data structures On Fri, Aug 31, 2012 at 10:38 AM, François REMY wrote: > > *From:* Alex Russell > *Sent:* Thursday, August 30, 2012 7:44 PM > *To:* ste...@stevensanderson.com > *Cc:* es-discuss@mozilla.org >

Re: Object.observe and observing "computed properties"

2012-08-31 Thread François REMY
From: Alex Russell Sent: Thursday, August 30, 2012 7:44 PM To: ste...@stevensanderson.com Cc: es-discuss@mozilla.org Subject: Re: Object.observe and observing "computed properties" On Wed, Aug 29, 2012 at 11:09 AM, Steve Sanderson wrote: Knockout developers are used to this sor

Re: Object.observe and observing "computed properties"

2012-08-30 Thread Alex Russell
On Wed, Aug 29, 2012 at 11:09 AM, Steve Sanderson wrote: > Hey > > Thanks very much for your detailed response! I totally agree that the > question can be distilled down to "deciding when [a] function should be > re-evaluated", and that two approaches are "2a: requiring function author > to decla

Re: Object.observe and observing "computed properties"

2012-08-29 Thread Steve Sanderson
Hey Thanks very much for your detailed response! I totally agree that the question can be distilled down to "deciding when [a] function should be re-evaluated", and that two approaches are "2a: requiring function author to declare [dependencies]" or "2b: attempt to discover [dependencies]". To cl

Re: Object.observe and observing "computed properties"

2012-08-29 Thread François REMY
ch listened specifically to array events and managed the DOM as a close copy of the array using a binding template; those 'insert' and 'delete' events could be transferred to a 'made-observable' arrays. -Message d'origine- From: Rafael Weinstein

Object.observe and observing "computed properties"

2012-08-28 Thread Rafael Weinstein
Steve Sanderson (author of the excellent KnockoutJS framework) and François REMY both raised the issue of observing computed properties WRT to the Object.observe() proposal. Having thought about this problem while helping to author Object.observe, my thoughts are as follows: First, I think you ne