It probably would be backward incompatible change. Too much code depends on
[Object Object].
2 gru 2014 08:46 Dmitry Soshnikov dmitry.soshni...@gmail.com napisał(a):
Hi,
Probably worth providing a default implementation of the `@@toStringTag`
when evaluating a class [1]. In this case users
Le 2 déc. 2014 à 09:04, Michał Wadas michalwa...@gmail.com a écrit :
It probably would be backward incompatible change. Too much code depends on
[Object Object].
I'm curious to know what sort of code would be broken by `O.p.toString.call(x)
=== [object Point]` for instances `x` of some
Same question here.
AFAIK usually the `({}.toString.call(generic) === [object Object])` check
is the `default:` in a switch, the last `else` in a flow, etc etc ...
although I wouldn't be surprised if some code, somewhere, would do strict
comparison to know if it's a user defined object or not. In
Le 2 déc. 2014 à 08:46, Dmitry Soshnikov dmitry.soshni...@gmail.com a écrit
:
Hi,
Probably worth providing a default implementation of the `@@toStringTag` when
evaluating a class [1]. In this case users will be able to do:
```
class Point { ... }
var p = new Point(1, 2);
The difference between [Object Point] and [Object Set] is fundamental.
Your application would not change any behavior without explicit creating
new Set.
But changing behavior of existing code is something different - it can
introduce subtle bugs in enclosed environment.
2 gru 2014 13:03 Claude
I think by `@@toStringTag` he meant the ability to define a `[[Class]]`
name so that `{}.toString.call(generic)` would return such name instead of
`Object` but I'm sure Dmitry will come back explaining and/or asking more.
On Tue, Dec 2, 2014 at 4:49 PM, Claude Pache claude.pa...@gmail.com wrote:
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Andrea
Giammarchi
I think by `@@toStringTag` he meant the ability to define a `[[Class]]` name
so that `{}.toString.call(generic)` would return such name instead of
`Object` but I'm sure Dmitry will come back explaining
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Michal
Wadas
But changing behavior of existing code is something different - it can
introduce subtle bugs in enclosed environment.
Nobody is proposing changing the behavior of existing code. They are proposing
changing
On Tue, Dec 2, 2014 at 9:56 AM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
I think by `@@toStringTag` he meant the ability to define a `[[Class]]`
name so that `{}.toString.call(generic)` would return such name instead of
`Object` but I'm sure Dmitry will come back explaining and/or
On Tue, Dec 2, 2014 at 5:12 PM, Dmitry Soshnikov dmitry.soshni...@gmail.com
wrote:
On Tue, Dec 2, 2014 at 9:56 AM, Andrea Giammarchi
andrea.giammar...@gmail.com wrote:
I think by `@@toStringTag` he meant the ability to define a `[[Class]]`
name so that `{}.toString.call(generic)` would
Hi,
Probably worth providing a default implementation of the `@@toStringTag`
when evaluating a class [1]. In this case users will be able to do:
```
class Point { ... }
var p = new Point(1, 2);
console.log(p); // [object Point]
```
The default implementation will be just (if the `className` is
11 matches
Mail list logo