Re: API for text editing

2012-10-18 Thread Brendan Eich
Brendan Eich wrote: JS the core language and JS the DOM ("level 0", more or less -- mostly less) originated with me in Netscape 2 in 1995. Why did two standards bodies end up working on these two "JS" aspects? Mostly politics and some division of expert labor flowing from politics of the market

Re: API for text editing

2012-10-18 Thread Brendan Eich
Mark Davis ☕ wrote: I don't see how the W3C could supply an API that would be accessible from Javascript, or am I misunderstanding? They do it all the time, using WebIDL. WebIDL has a JS binding that is still being tweaked. http://www.w3.org/TR/WebIDL/ WebIDL is a Candidate Recommendation,

Re: API for text editing

2012-10-18 Thread Mark Davis ☕
I don't see how the W3C could supply an API that would be accessible from Javascript, or am I misunderstanding? Mark * * *— Il meglio è l’inimico del bene —* ** On Thu, Oct 18, 2012 at 2:55 PM, Norbert Lindenberg < ecmascr...@norbertlindenberg.com

Re: API for text editing

2012-10-18 Thread Norbert Lindenberg
Hi Mark, API to support text editing applications is an important topic, but I'm afraid it's beyond the scope that TC 39 generally defines for itself. TC 39 primarily defines the ECMAScript language, and then adds some core API that's required in all environments where the language might be use

Re: Object.assign()

2012-10-18 Thread Ariya Hidayat
> 2. If the last parameter is boolean, then it's created as > includeNonEnumerable: > > Object.assign(desc, source1[, source2, ... sourceN, includeNonEnumerable); > > Example; > > Object.assign({a: 10}, {b: 20}, Object.defineProperties({}, {c: {value: > 30}}), true); // {a: 10, b: 20, c: 30} That'

Re: Object.assign()

2012-10-18 Thread Yehuda Katz
On Thu, Oct 18, 2012 at 10:13 AM, Rick Waldron wrote: > > > On Thu, Oct 18, 2012 at 12:59 AM, Dmitry Soshnikov < > dmitry.soshni...@gmail.com> wrote: > >> >> On Oct 17, 2012, at 9:34 PM, Axel Rauschmayer wrote: >> >> Pardon, I missed and cannot find what is Object.assign(...), seems it's >> not fr

Re: Object.assign()

2012-10-18 Thread Yehuda Katz
The original proposal was for two methods: Object.assign and Object.define. Object.assign would pave the cowpath of all of the extend() APIs already in circulation. We thought the precedent of not copying enumerable methods in those cases was enough reason for Object.assign to have this behavior.

Re: Object.assign()

2012-10-18 Thread Rick Waldron
On Thu, Oct 18, 2012 at 12:59 AM, Dmitry Soshnikov < dmitry.soshni...@gmail.com> wrote: > > On Oct 17, 2012, at 9:34 PM, Axel Rauschmayer wrote: > > Pardon, I missed and cannot find what is Object.assign(...), seems it's > not from the latest draft. Is it just defining properties (via > Object.def

Re: Object.assign()

2012-10-18 Thread Brandon Benvie
When exactly do you want to carte blanche copy everything off of a method-bearing object without doing some reconnaissance? I personally make heavy use of enumerability to make my intentions as a library author known, rather than using '_' prefixed properties. Partially because I have less need to

Re: Object.assign()

2012-10-18 Thread Herby Vojčík
Axel Rauschmayer wrote: Addendum: For example, you won’t be able to reliably use Object.assign() to mix an object with methods into a prototype object, because those methods might be non-enumerable. That's wrong use of Object.assign. Remember the debate on :=, there is intent distinction bet

Re: Object.assign()

2012-10-18 Thread Herby Vojčík
Rick Waldron wrote: On Wednesday, October 17, 2012 at 10:47 PM, Axel Rauschmayer wrote: On Wednesday, October 17, 2012 at 10:27 PM, Axel Rauschmayer wrote: I’m a bit skeptical about excluding non-enumerable properties for Object.assign(). I still find enumerability a hard concept to wrap my m