No one has taken my bet :-P.
/be
Mark S. Miller wrote:
On Sun, Feb 22, 2015 at 3:12 PM, Mark S. Miller erig...@google.com
mailto:erig...@google.com wrote:
Array.prototype has reverted to being an empty initially empty
exotic array object.
Function.prototype remains a no-op
Since gambling with real money is technically still illegal, I have
responded to Brendan privately.
On Mon, Feb 23, 2015 at 10:35 AM, Brendan Eich bren...@mozilla.org wrote:
No one has taken my bet :-P.
/be
Mark S. Miller wrote:
On Sun, Feb 22, 2015 at 3:12 PM, Mark S. Miller
Is Array.prototype an exotic Array Instance? Or is it still a standard
exotic object? This is somewhat relevant to V8 bug 3890
https://code.google.com/p/v8/issues/detail?id=3890, which is targeted at
implementing that change.
--
Isiah Meadows
___
On Sun, Feb 22, 2015 at 3:12 PM, Mark S. Miller erig...@google.com wrote:
Array.prototype has reverted to being an empty initially empty exotic
array object.
Function.prototype remains a no-op function object.
Empty in terms of the indexed properties, and with a .length of 0.
Array.prototype
Array.prototype has reverted to being an empty initially empty exotic array
object.
Function.prototype remains a no-op function object.
All the other X.prototypes remain plain vanilla non-exotic objects.
On Sun, Feb 22, 2015 at 2:33 PM, Isiah Meadows isiahmead...@gmail.com
wrote:
Is
To me I would like it to be reverted for back-compatiblity.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Le 20 févr. 2015 à 02:11, Kyle Simpson get...@gmail.com a écrit :
Just curious… for RegExp, Date, String and the others that *are* changing to
plain objects… does that mean `Object.prototype.toString.call( .. )` will
return [object Object] on them?
Sorry, I've kinda gotten lost on what
Has any engine tried implementing the ES6 changes from ur-instances to
plain objects?
We are kidding ourselves about this change being web compatible if the
answer is no. I would bet real money that something will break. Who
wants to wager?
/be
Allen Wirfs-Brock wrote:
On Feb 19, 2015,
On 19 Feb 2015, at 21:09, Andrea Giammarchi andrea.giammar...@gmail.com
wrote:
if we'd like to have Array.empty, Function.empty, String.empty and friends,
what's wrong with having these as we always had already: as prototypes?
I find it more self-explanatory. Here, prototypes are taking
On Thu, Feb 19, 2015 at 12:14 PM, Axel Rauschmayer a...@rauschma.de wrote:
However, you can’t freeze `Array.prototype`
We do.
--
Cheers,
--MarkM
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
yep, not only you can, but also consider if that was frozen, half of ES5
wouldn't have existed.
You want to exted it? Thanks to ES5 just go for it! You want to be
obtrusive or that secure? Freeze it.
Does this affect the ability to use Array.prototype as empty array? Not at
all, it does not
P.S. yes, the semantic already frozen purpose of an empty property though,
I agree that'd be cool
On Thu, Feb 19, 2015 at 8:21 PM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
yep, not only you can, but also consider if that was frozen, half of ES5
wouldn't have existed.
You want to
Personally I'd love to see `Array.empty`, `Function.empty`, `Map.empty`,
`String.empty`, etc as nonconfigurable nonwritable
frozen/sealed/extensionsPrevented available by default - that might provide
the (polyfillable) use case Kyle is currently describing, and might provide
a path to making
are there any other builtins that anybody (Kyle, or otherwise) sees as
problematic to continue with the breaking change
As that book chapter mentions, the only other one I've ever used is
RegExp.prototype (being the default empty match /(?:)/ regular expression). I
have used that only once
if we'd like to have Array.empty, Function.empty, String.empty and friends,
what's wrong with having these as we always had already: as prototypes?
I see just moving and duplicating gotchas, instead of keeping in a well
known behavior.
This exotic problem ... I never really understood it, I
you want to freeze everything *.empty
I don't think most of those *need* to be frozen, per se, since they're already
immutable: `Function`, `String`, `Number`, `Boolean`, `RegExp`, … all immutable
themselves. `Array.prototype` is however mutable
(`Array.prototype.push(1,2,3)`), so freezing it
I just remembered that I also do a sort of `Object.empty` in my own code
somewhat frequently, as can be seen here for example:
https://github.com/getify/asynquence/blob/master/asq.src.js#L826
Declaring an empty object: `var ø = Object.create(null)`, and then using that
`ø` as a sort of global
On Feb 19, 2015, at 12:09 PM, Andrea Giammarchi wrote:
if we'd like to have Array.empty, Function.empty, String.empty and friends,
what's wrong with having these as we always had already: as prototypes?
Just to keep things focused. *.empty is not something that is on the table for
ES6. It
Is there a good reason behind making prototypes ordinary objects?
On the margin - I would assume Array.empty to be static method to clean
array.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On Thu, Feb 19, 2015 at 12:56 PM, Allen Wirfs-Brock al...@wirfs-brock.com
wrote:
On Feb 19, 2015, at 12:09 PM, Andrea Giammarchi wrote:
if we'd like to have Array.empty, Function.empty, String.empty and
friends, what's wrong with having these as we always had already: as
prototypes?
Just
Does it not make sense anyways for Object.freeze on a RegExp instance to
prohibit
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-regexpinitialize
from being called?
`var regex = Object.freeze(/a/g); regex.compile('b', 'i');` should throw
imo.
On Thu, Feb 19, 2015 at 1:13 PM, Mark S.
I'm not writing to start or join a debate on the merits of using
`Function.prototype` and `Array.prototype` in the aforementioned ways. I'm
writing to confirm that they are in fact used, not just theoretically made up.
I have been writing about and teaching for several years usage of
On Feb 19, 2015, at 1:13 PM, Mark S. Miller wrote:
On Thu, Feb 19, 2015 at 12:56 PM, Allen Wirfs-Brock al...@wirfs-brock.com
wrote:
On Feb 19, 2015, at 12:09 PM, Andrea Giammarchi wrote:
if we'd like to have Array.empty, Function.empty, String.empty and friends,
what's wrong
On Feb 11, 2015, at 8:30 AM, Allen Wirfs-Brock wrote:
TC39 members were aware that changing to using ordinary objects as the
prototypes of the legacy built-ins was a breaking change (for example, it
changes the prototypes {}.toString value). What we agreed to do was to make
that change
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Allen
Wirfs-Brock
This looks like the sort of evidence we asked for.
I don't really think so. This is some tweets and books, not evidence of
real-world usage that would break popular websites and cause browser game
theory
not evidence of real-world usage that would break popular websites
the Web is (still and thankfully) not about popular websites only.
Using the `Array.prototype` instead of creating instances in the wild has
been seen for long time, same way you don't do `{}.toString.call` but
I think I do understand ... is this operation valid in ES6 ?
`var oneTwoThree = Array.prototype.concat(1, 2, 3); // [1, 2, 3]`
'cause that was the initial concern, and as far as I understand that will
break.
Or does it?
On Thu, Feb 19, 2015 at 4:59 PM, Domenic Denicola d...@domenic.me wrote:
On Feb 19, 2015, at 9:01 AM, Andrea Giammarchi wrote:
I think I do understand ... is this operation valid in ES6 ?
`var oneTwoThree = Array.prototype.concat(1, 2, 3); // [1, 2, 3]`
you would get: [Array.prototype, 1, 2, 3]
That's what convinced me.
allen
I remember once upon a time double quotes meant explicit intent of exact
match, t least in Google, IIRC, dunno when that good idea got lost.
Yes, it's hard to find for exact matches but if you also check the reduce
example, `Array.prototype` is simply passed around.
Again, I don't know how much
From: Andrea Giammarchi [mailto:andrea.giammar...@gmail.com]
Can we have either a list of these changes (I'm sure I've missed many, like
this one, for example)
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-in-the-6th-edition
___
Annex E ... I've never reached that part ... Thanks!
On Thu, Feb 19, 2015 at 5:42 PM, Domenic Denicola d...@domenic.me wrote:
From: Andrea Giammarchi [mailto:andrea.giammar...@gmail.com]
Can we have either a list of these changes (I'm sure I've missed many,
like this one, for example)
1) The ES6 class pattern makes abstractions whose .prototype is an ordinary
object. This change makes the builtin abstractions more consistent with
class-based abstractions, minimizing surprise for future JS programmers who
learn the language at ES6 or later.
2) From a security perspective, the
Just curious… for RegExp, Date, String and the others that *are* changing to
plain objects… does that mean `Object.prototype.toString.call( .. )` will
return [object Object] on them?
Sorry, I've kinda gotten lost on what the default @@toStringTag behavior is
going to be here.
33 matches
Mail list logo