Le 4 déc. 2012 à 22:28, Brendan Eich bren...@mozilla.org a écrit :
Mark S. Miller wrote:
On Tue, Dec 4, 2012 at 10:48 AM, Brendan Eichbren...@mozilla.org wrote:
Kevin Smith wrote:
I recommend allowing let declarations only in strict mode. This is the
simple, backwards-compatible path.
Le 5 déc. 2012 à 15:28, Brendan Eich bren...@mozilla.org a écrit :
Claude Pache wrote:
Le 4 déc. 2012 à 22:28, Brendan Eichbren...@mozilla.org a écrit :
Mark S. Miller wrote:
On Tue, Dec 4, 2012 at 10:48 AM, Brendan Eichbren...@mozilla.org wrote:
Kevin Smith wrote:
I recommend
Hello,
In SpiderMonkey (and perhaps other JS engines?), there are conditional catch
clauses:
catch (exception if condition)
Could such a feature added to ECMAScript?
Rationale: Although try/catch mechanism was initially intended for treating
errors, it could be used in normal control
Le 19 déc. 2012 à 15:32, David Bruant bruan...@gmail.com a écrit :
Le 19/12/2012 14:13, Claude Pache a écrit :
Hello,
In SpiderMonkey (and perhaps other JS engines?), there are conditional catch
clauses:
catch (exception if condition)
Could such a feature added to ECMAScript
Le 20 déc. 2012 à 00:31, John J Barton johnjbar...@johnjbarton.com a écrit :
On Wed, Dec 19, 2012 at 11:23 AM, Brendan Eich bren...@mozilla.com wrote:
John J Barton wrote:
On Wed, Dec 19, 2012 at 8:11 AM, Brandon Benvie bran...@brandonbenvie.com
mailto:bran...@brandonbenvie.com wrote:
Le 30 déc. 2012 à 19:20, David Bruant bruan...@gmail.com a écrit :
Interesting point.
Unrelated, but it's making me realize that innerHTML may stay a getter/setter
(not sure about inherited or not).
I guess the divide I'd like to put is between object state and what is
conveniently put as
I think that nothing wins over dot or underscore for marking unused
positions, for one simple reason: it is implemented for years in every engines
in constructs like:
var myArray = [ , , third]
So it seems more natural to me to have something like: function( , , z) { /*
... */ }
But anyway,
Le 31 déc. 2012 à 10:17, Axel Rauschmayer a...@rauschma.de a écrit :
I’d be interested in other examples of implicit conversions stumping people.
What stumped who, when? Any bugs/github issues/blog posts to cite?
No, I think I agree with your assessment that implicit conversion to boolean
Le 31 déc. 2012 à 18:58, Axel Rauschmayer a...@rauschma.de a écrit :
Personally, I have issues with from- and to-String conversions when working
with HTML form field values and data-* attributes. More precisely, I am
careful to make these conversions manually, and I regret that JS doesn't
I've just discovered that someone is fallen in the following pit:
Change of the semantic of function declarations in Firefox when included in
block (spoiler: hoisting issue).
(Not standard ES for sure, but definitely JS.)
Enjoy: http://statichtml.com/2011/spidermonkey-function-hoisting.html
On Sun, Jan 6, 2013 at 5:06 AM, Axel Rauschmayer a...@rauschma.de wrote:
snip
This is not about pointing out how bad JavaScript is, it is about
collecting things that confuse people who are new to the language. They
help those people to learn what you already know. Many people really
Le 14 janv. 2013 à 19:29, Kevin Smith khs4...@gmail.com a écrit :
The concept of freezing the whole object is the problem. If you
call `freeze` on a DOM object, does the page stop changing? Of course
not -- objects can have hidden state that you, the client of that
object, have no
—Claude
Le 14 janv. 2013 à 20:46, Claude Pache claude.pa...@gmail.com a écrit :
Le 14 janv. 2013 à 19:29, Kevin Smith khs4...@gmail.com a écrit :
The concept of freezing the whole object is the problem. If you
call `freeze` on a DOM object, does the page stop changing? Of course
Le 16 janv. 2013 à 09:11, David Bruant bruan...@gmail.com a écrit :
Hi,
This is an idea naturally derived of all the current discussions about
WeakMaps and Private symbols. The proposal is easily summarized by these
lines of code:
var wm = new WeakMap();
var o = {};
o[wm] =
Le 21 janv. 2013 à 11:58, David Bruant bruan...@gmail.com a écrit :
Le 21/01/2013 10:05, Claude Pache a écrit :
Le 16 janv. 2013 à 09:11, David Bruant bruan...@gmail.com a écrit :
Hi,
This is an idea naturally derived of all the current discussions about
WeakMaps and Private symbols
Le 22 janv. 2013 à 22:34, David Bruant bruan...@gmail.com a écrit :
Back to weakmaps, the issue here is not technical, but... cultural I would
say.
Indeed, the issue is cultural. We are questioning WeakMap.prototype.clear,
because some people think that WeakMap should provide some strong
Le 30 janv. 2013 à 06:12, Andrea Giammarchi andrea.giammar...@gmail.com a
écrit :
I have a blog post about it called
Resurrecting The With Statement
and before I post the link, there the long story short:
putting `with(this){` before any build process/inlined library and `}` at the
*/
})();
}
On Wed, Jan 30, 2013 at 10:48 AM, Claude Pache claude.pa...@gmail.com wrote:
Le 30 janv. 2013 à 06:12, Andrea Giammarchi andrea.giammar...@gmail.com a
écrit :
I have a blog post about it called
Resurrecting The With Statement
and before I post the link, there the long
Le 1 févr. 2013 à 20:00, Andreas Rossberg rossb...@google.com a écrit :
On 1 February 2013 18:24, Brandon Benvie bran...@brandonbenvie.com wrote:
A postfix '?' would require backtracking when the next '}' is found...I
think?
Yeah. I admit that I don't remember much of the earlier
Le 8 févr. 2013 à 16:00, David Bruant bruan...@gmail.com a écrit :
Le 07/02/2013 18:42, Andreas Rossberg a écrit :
On 7 February 2013 18:36, David Bruant bruan...@gmail.com wrote:
I hardly understand the benefit of an inconditionally-throwing setter over a
__proto__ as data property, but I'm
Le 8 févr. 2013 à 23:07, David Bruant bruan...@gmail.com a écrit :
Le 08/02/2013 19:35, Allen Wirfs-Brock a écrit :
On Feb 8, 2013, at 10:15 AM, Claude Pache wrote:
The magic is not in the form of the '__proto__' property of the
Object.prototype object, but in the action that its setter
Le 10 févr. 2013 à 22:01, David Bruant bruan...@gmail.com a écrit :
snip
I have to note that there is a minor security hazard in code using iterators
naively:
import process from m;
var a = [1, 2, 3, 4, 5];
var next = 0;
var it = {
next: function(){
manually such a StopIteration with:
new StopIteration(source, value)
[1] http://wiki.ecmascript.org/doku.php?id=harmony:generators
—Claude
Claude Pache wrote:
In order to mitigate the problem, instead of throwing a generic
StopIteration, I think we ought to throw a specific StopIteration instance
at 9:35 PM, Claude Pache claude.pa...@gmail.com wrote:
Le 10 févr. 2013 à 22:01, David Bruant bruan...@gmail.com a écrit :
snip
I have to note that there is a minor security hazard in code using
iterators naively:
import process from m;
var a = [1, 2, 3, 4, 5];
var next
Le 18 févr. 2013 à 12:29, David Bruant bruan...@gmail.com a écrit :
snip
# On older browser not running strict mode
I was precisely going to write that it is missing an important explicit advice
to produce code that runs both under strict and non-strict mode.
That point is a very valid
Le 18 févr. 2013 à 00:56, Biju bijumaill...@gmail.com a écrit :
On 16 February 2013 20:26, David Bruant bruan...@gmail.com wrote:
Le 17/02/2013 00:58, Biju a écrit :
Also, it doesn't seem that hard to implement:
String.prototype.startsWithI = function(s){
this.match(new
An alternative to a writable 'length' property, is to make it configurable and
nonwritable. It would prevent the issue of accidental assignments to the
'length' property that used be ignored in non-strict mode (they'll still be
ignored), but it would allow to modify its value using
The Set constructor accepts an iterable (including an Array and a Set) as an
argument to populate the newly-constructed Set with several values. There
should also be the possibility to add or remove multiple elements of an
already-constructed Set. That covers unions and differences, but it is
Le 4 mars 2013 à 23:37, Claude Pache claude.pa...@gmail.com a écrit :
The Set constructor accepts an iterable (including an Array and a Set) as an
argument to populate the newly-constructed Set with several values. There
should also be the possibility to add or remove multiple elements
Le 19 mars 2013 à 21:53, Andrea Giammarchi andrea.giammar...@gmail.com a
écrit :
Is there any mechanism in any future specs that does **not** let
Object.getPrototypeOf(object) return the prototype and return null instead ?
Object.hidePrototypeOf(object)
Object.hidePrototypeOf =
Le 25 mars 2013 à 08:28, Axel Rauschmayer a...@rauschma.de a écrit :
2. Function expressions -- arrow functions
No, it depends. Roughly, I would replace function expressions by arrow
functions when I want to use the 'this' binding of the enclosing scope (or
don't use the 'this' binding), and
Le 13 avr. 2013 à 09:56, Andreas Rossberg rossb...@google.com a écrit :
On 13 April 2013 00:35, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
snip
Regarding #3
The biggest footgun is if
new Symbol()
creates a Symbol wrapper. However,
new Symbol()
returning a primitive values
Le 13 avr. 2013 à 15:25, Andreas Rossberg rossb...@google.com a écrit :
On 13 April 2013 13:36, Claude Pache claude.pa...@gmail.com wrote:
Le 13 avr. 2013 à 09:56, Andreas Rossberg rossb...@google.com a écrit :
On 13 April 2013 00:35, Allen Wirfs-Brock al...@wirfs-brock.com wrote
Le 15 avr. 2013 à 09:27, Sorin Mocanu sorinmoc...@google.com a écrit :
Hi Norbert,
Sorry for not having better explained my suggestion.
`var date = Date.withTimeZone(America/Los_Angeles, 2013, 3, 9, 15, 11, 0);`
would create a Date object with a local time for America/Los_Angeles,
Hi,
I've noted that it is a Syntax error to write things like `if (foo) let x;` or
`while (bar) let x;` (without block enclosing the `let x` statement), both in
the latest version of FF and Chrome (appropriate experimental flags enabled),
which is a very reasonable behaviour. However, I was
Le 15 avr. 2013 à 14:43, Dean Landolt d...@deanlandolt.com a écrit :
On Sun, Apr 14, 2013 at 10:49 PM, Norbert Lindenberg
ecmascr...@lindenbergsoftware.com wrote:
On Apr 9, 2013, at 15:23 , Nebojša Ćirić wrote:
I'll add this as a second option to the strawman.
2013/4/9
Le 15 avr. 2013 à 15:29, André Bargull andre.barg...@udo.edu a écrit :
Statements and Declarations are separate production rules (cf. 12 Statements
and Declarations in the draft), only a Statement can be nested directly
within an if-Statement.
- André
Indeed, thanks.
—Claude
Hi,
Le 10 mai 2013 à 14:55, Mark S. Miller erig...@google.com a écrit :
[+es-discuss]
I didn't realize that I composed this in reply to a message only on
public-script-coord. Further discussion should occur only on es-discuss.
Sorry for the confusion.
On Fri, May 10, 2013 at 5:52 AM,
Le 12 juin 2013 à 12:55, Andreas Rossberg rossb...@google.com a écrit :
On 11 June 2013 21:19, Brendan Eich bren...@mozilla.com wrote:
Andreas Rossberg wrote:
That makes a terrible API, though. I think Axel has a valid point that
the distinction between iterators and iterables is fuzzy
Le 12 juin 2013 à 18:14, Andreas Rossberg rossb...@google.com a écrit :
On 12 June 2013 14:12, Claude Pache claude.pa...@gmail.com wrote:
snip
On the other hand, I see a small advantage of the weird requirement for
iterators to be iterables themselves: It allows to discriminate between
Le 12 juin 2013 à 20:46, Andreas Rossberg rossb...@google.com a écrit :
On 12 June 2013 19:51, Brendan Eich bren...@mozilla.com wrote:
The @iterator part of the iteration protocol is not about coercion or types
at all. It is a pattern for getting or creating a usable iterator from an
Le 13 juin 2013 à 03:33, Brendan Eich bren...@mozilla.com a écrit :
Andreas Rossberg wrote:
On 12 June 2013 23:27, Claude Pacheclaude.pa...@gmail.com wrote:
Therefore, I think that For/of coerces its argument to an iterator is a
wrong mental model, and For/of accepts either a reusable
Le 15 juin 2013 à 10:18, François REMY francois.remy@outlook.com a écrit :
I'm maybe biased, but I would love to consider yield as a function. Indeed,
it calls another code, which can return you a value. That looks very similar
to a function call to me. If we do this, the predecence
I've just added a warning on the corresponding page of the MDN JavaScript
Reference [1] (the last bullet of the Description section and the red box at
the top of the page), so that this Reference ceases to be guilty of not warning
that `with` is future-hostile.
[1]
Le 18 juin 2013 à 03:30, Brandon Benvie bben...@mozilla.com a écrit :
On 6/17/2013 4:33 PM, Jason Orendorff wrote:
Firefox added Array.prototype.values() and immediately ran into
compatibility issues.
https://bugzilla.mozilla.org/show_bug.cgi?id=883914
Iterables are useful not only in for/of loops but also in otherwise
polyfillable constructs; for example, in the Set constructor:
// Let `a` be a Set object
b = new Set(a) // copy the elements of `a` into a new Set
Question: Will there be a standard way for obtaining the @@iterator
Le 29 juin 2013 à 00:14, Eric Elliott e...@ericleads.com a écrit :
snip
I saw a recent example of one of the problems with single-ancestor
inheritance in a talk. I wish I could remember which one. The illustrations
were great:
Animal
- Walking
- Monkey
- Human
- Flying
even if you start out using class
inheritance, it can be problematic to switch to mixins and similar strategies
down the road.
- Eric
On Fri, Jun 28, 2013 at 7:41 PM, Claude Pache claude.pa...@gmail.com wrote:
Le 29 juin 2013 à 00:14, Eric Elliott e...@ericleads.com a écrit :
snip
* `Date()` and `new Date` give different results;
* It would add complexity (for the programmer) to have constructors defined the
ES1-5 way and constructors defined using `class` behave differently;
* Opinions differ on best practices.
—Claude
Le 2 juil. 2013 à 07:09, Domenic Denicola
Le 10 juil. 2013 à 11:26, David Bruant bruan...@gmail.com a écrit :
Hi,
I was wondering whether it was any useful to have the thisArg argument in
Array#find and Array#findIndex.
As of ES6, the language has Function.prototype.bind and arrow functions and I
would imagine these to be
Le 10 juil. 2013 à 19:05, David Bruant bruan...@gmail.com a écrit :
Who needs this particular consistency anyway?
IMO, when designing an API, the right question is not: Why would I be
consistent in that particular case?, but: Why would I be inconsistent in that
particular case? You didn't
Le 17 juil. 2013 à 18:43, Andreas Rossberg rossb...@google.com a écrit :
If users ignore them anyway, why would they care?
If symbols are primitives with wrapper, they *must* care: They must know that
`new Symbol` does not produce a new symbol, but some useless object. At least,
`new
IIUC, the problem with symbols-as-primitives is that, on one hand, wrapper
objects are not wanted, but, on the other hand, getting rid of wrappers leads
to complications.
My suggestion is to allow wrapper objects to exist in the spec, but to
completely hide them from the user by doing an
Two (or three) remarks:
(1) The following expressions are perfectly reasonable, where a, b, c, d are
variables holding numbers, and y is a variable (not a literal) holding a
boolean:
a b == y
a b == c d
and even (although it demands some imagination):
a b
Le 22 juil. 2013 à 17:55, Andy Earnshaw andyearns...@gmail.com a écrit :
On Mon, Jul 22, 2013 at 2:24 PM, Claude Pache claude.pa...@gmail.com wrote:
Even if we ignore the last expression, it would be surprising (for, e.g.,
people used to Python), if we change the meaning of `a b = y
```
var Oo22 = 60
window.alert(Oo22 - 0o22) // 42 O_o
```
Indeed, you ain't gonna need it for obfuscating your code, there's already more
than one way to do it. :-)
Since there won't be much code containing words starting with OO, O0, 0O or 00,
the risk of eye-bleeding is low. OT0H, it would
I consider your first three complaints as features instead of defects, and the
last one as an expert feature. The use strict directive corrected only
objectively problematic misfeatures.
??Claude
Le 24 juil. 2013 ?? 11:35, BelleveInvis infinte.c...@hotmail.com a ??crit :
I think that we
Le 30 juil. 2013 à 21:39, Andrew Fedoniouk n...@terrainformatica.com a écrit :
I am not sure if it close to the problem you describe but something
tells me that it is.
You missed my point. I do not want to change the approach to iteration, even if
it solves a problem. I am proposing
Le 31 juil. 2013 à 20:23, Tab Atkins Jr. jackalm...@gmail.com a écrit :
The first issue still up for community discussion involves the
definition of promise-like.
We'd like the definition to be: (a) a Promise or subtype, or (b) a
branded non-Promise (with the branding done via Symbol or
Le 1 août 2013 à 00:53, Claude Pache claude.pa...@gmail.com a écrit :
Le 31 juil. 2013 à 20:23, Tab Atkins Jr. jackalm...@gmail.com a écrit :
The first issue still up for community discussion involves the
definition of promise-like.
We'd like the definition to be: (a) a Promise
Le 3 août 2013 à 12:01, David Bruant bruan...@gmail.com a écrit :
For both null and the new value types, I'm still unclear on why could devs
would choose something different than the default. I feel the incentives can
only weigh in favor of keeping the default. I'm interested in what other
Le 4 août 2013 à 01:39, Brendan Eich bren...@mozilla.com a écrit :
Brendan Eich wrote:
Claude Pache wrote:
Fixing `typeof` of old (null) and new value types would be a solution, but
I'm rather definitely considering something like the defunct
`Object.isObject()`
I forgot to add that my
Le 4 août 2013 à 01:34, Brendan Eich bren...@mozilla.com a écrit :
Claude Pache wrote:
Fixing `typeof` of old (null) and new value types would be a solution, but
I'm rather definitely considering something like the defunct
`Object.isObject()`. (As a side-note, I suggest `typeof uint64(0
Le 4 août 2013 à 18:23, Brendan Eich bren...@mozilla.com a écrit :
You must mean by 'objectness' reference-not-value semantics -- typeof
returning object or function and the user ruling out null value (or
opting into null result) doesn't do a thing to reject non-extensible,
Le 5 août 2013 à 19:14, Brendan Eich bren...@mozilla.com a écrit :
Claude Pache wrote:
Le 4 août 2013 à 18:23, Brendan Eichbren...@mozilla.com a écrit :
You must mean by 'objectness' reference-not-value semantics -- typeof
returning object or function and the user ruling out null value
Le 27 août 2013 à 01:23, Brendan Eich bren...@mozilla.com a écrit :
Andrea Giammarchi wrote:
Is it very useful because you wrote for instead of while ?
```javascript
while (m = re.exec(str))
console.log(m[0])
;
```
It is, for two reasons:
1. in JS only for can have a let or var
...@gmail.com wrote:
sure you know everything as soon as you read `of` ... right ? How objectives
are your points ? If you know JS that while looks very simple, IMO
On Tue, Aug 27, 2013 at 5:24 AM, Claude Pache claude.pa...@gmail.com wrote:
Le 27 août 2013 à 01:23, Brendan Eich bren
Le 28 août 2013 à 17:23, Axel Rauschmayer a...@rauschma.de a écrit :
This must have been suggested before, but it would be great to have a
built-in function for quoting text in a RegExp.
For example:
```js
RegExp.quoteText = function (text) {
return
Note that an equivalent of both `.map` and `.filter` already exists in ES6: its
name is generator expression. For instance:
```
array.filter(pred).map(transf)
```
becomes:
```
(for (let x of iter) if (pred(x)) transf(x))
```
—Claude
Le 28 août 2013 à 17:27, Forbes Lindesay
The `uncurryThis` metafunction, given as example in [1], needs to correct the
length of a function produced by `bind`. Simplified version:
```
uncurryThis = f = Function.protytpe.call.bind(f) //
uncurryThis(f).length == 1 instead of f.length + 1
```
So, yes, `bind` should produce
Le 30 août 2013 à 18:54, Mark S. Miller erig...@google.com a écrit :
It seems we have legacy saying that name should be writable.
Really? Just tried in the console of the latest stable versions of Firefox,
Safari, Chrome and IE:
```
Object.getOwnPropertyDescriptor(function() {}, 'name')
Filed bug: https://bugs.ecmascript.org/show_bug.cgi?id=1868
—Claude
Le 30 août 2013 à 18:34, Brendan Eich bren...@mozilla.com a écrit :
Allen probably could use a bug on file at bugs.ecmascript.org -- anyone?
/be
Claude Pache mailto:claude.pa...@gmail.com
August 30, 2013 5:35 AM
Le 9 sept. 2013 à 10:35, David Bruant bruan...@gmail.com a écrit :
Le 08/09/2013 21:39, Brendan Eich a écrit :
In no case does anyone that I've spoken to, on TC39 or anywhere else around
this planet, want *yet another* bottom type and singleton value a la null
and undefined. No one. Those
Le 9 sept. 2013 à 11:51, David Bruant bruan...@gmail.com a écrit :
Le 09/09/2013 11:41, Claude Pache a écrit :
Le 9 sept. 2013 à 10:35, David Bruant bruan...@gmail.com a écrit :
Le 08/09/2013 21:39, Brendan Eich a écrit :
In no case does anyone that I've spoken to, on TC39 or anywhere else
Le 16 sept. 2013 à 11:30, raul mihaila raul.miha...@gmail.com a écrit :
Hello,
I think the definition of modulo is wrong.
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-5.2
k should be of the same sign as x not as y.
I think the definition is correct, and is more useful than
Le 16 sept. 2013 à 13:40, Claude Pache claude.pa...@gmail.com a écrit :
Le 16 sept. 2013 à 11:30, raul mihaila raul.miha...@gmail.com a écrit :
Hello,
I think the definition of modulo is wrong.
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-5.2
k should be of the same sign
I suggest:
[ ... mySet ]
or, if you don't want to use any new syntax:
Array.from(mySet)
—Claude
P.S. The syntax `[e for e of mySet]` is outdated in Harmony, you should use
`[(for let e of mySet) e]`.
Le 16 sept. 2013 à 17:33, Angus Croll anguscr...@gmail.com a écrit :
I'm
Le 16 sept. 2013 à 18:38, Brendan Eich bren...@mozilla.com a écrit :
Claude, thanks for answering, one correction at bottom:
Claude Pache mailto:claude.pa...@gmail.com
September 16, 2013 11:42 AM
I suggest:
[ ... mySet ]
or, if you don't want to use any new syntax:
Array.from(mySet
Le 1 oct. 2013 à 19:33, Brendan Eich bren...@mozilla.com a écrit :
Allen Wirfs-Brock wrote:
Currently, that works for everything but null
and undefined, so I assume that this pattern is used quite a bit.
Do you think it really is?
I don't. (That is, I don't see much x.toString()
Explicit .toString() calling is rare because verbose, in addition to
throwing on null and undefined. People use + ''.
I tend to use `String(x)` (which is equivalent).
Actually it isn't. String(x) is specified to call the ToString abstract
operation on x which in the current
According to the latest version of the ES6 draft, section 25.2 [1], the
std:iteration module exports these names:
* iterator
* GeneratorFunction
* Generator
I have two questions:
1. What does the iterator name refer to? My guess is that it is intended to
give access the @@iterator symbol.
2.
Ok, thanks.
—Claude
Le 7 oct. 2013 à 14:35, Allen Wirfs-Brock al...@wirfs-brock.com a écrit :
this material will be gone from the next draft. At the last TC39 meeting we
agreed that they were unnecessary.
Allen
On Oct 7, 2013, at 8:23 AM, Claude Pache wrote:
According
Le 8 oct. 2013 à 07:21, Allen Wirfs-Brock al...@wirfs-brock.com a écrit :
On Oct 7, 2013, at 8:05 PM, Nathan Wall wrote:
Set foo to bar.[[Baz]]
Does `foo` ever result in a non-undefined value if `bar` doesn't have an own
`[[Baz]]` property but inherits from an object that has an
Le 9 oct. 2013 à 18:46, Oliver Hunt oli...@apple.com a écrit :
On Oct 9, 2013, at 1:35 AM, Claude Pache claude.pa...@gmail.com wrote:
Le 8 oct. 2013 à 23:43, Andrew Fedoniouk n...@terrainformatica.com a
écrit :
Quite often Date values are used in data exchanges in form of JS
Hello,
You might know that the following ES expressions are broken:
text.charAt(0) // get the first character of the text
text.length 100 ? text.substring(0,100) + '...' : text // cut the
text after 100 characters
The reason is *not* because ES works with UTF-16 code units
Le 24 oct. 2013 à 16:24, Mathias Bynens math...@qiwi.be a écrit :
text.graphemeAt(0) // get the first grapheme of the text
// shorten a text to its first hundred graphemes
var shortenText = ''
let numGraphemes = 0
for (let grapheme of text) {
Le 30 oct. 2013 à 04:54, Oliver Hunt oli...@apple.com a écrit :
As currently specified Math.sign has 5 different return values and, as far as
i can tell, does not solve the problem I thought it was trying to address.
That is the difficulty in distinguishing positive and negative numbers
Le 30 oct. 2013 à 11:44, K. Gadd k...@luminance.org a écrit :
Unfortunately Claude, ES Math.sign is not Signum; it has five outputs, not
three, like Oliver was asking about. Observe:
Math.sign(1 / 0)
1
Math.sign(-1 / 0)
-1
Math.sign(-1 / 0 * 0)
NaN
Math.sign(0 * -1)
-0
Le 15 nov. 2013 à 17:59, Rick Waldron waldron.r...@gmail.com a écrit :
On Fri, Nov 15, 2013 at 11:34 AM, Axel Rauschmayer a...@rauschma.de wrote:
(...)
That would make the async programming code more compact, too (I’m assuming a
nullary paren-free arrow variant and I prefer the
Le 10 déc. 2013 à 13:59, Mathias Bynens math...@qiwi.be a écrit :
From http://ecma-international.org/ecma-262/5.1/#sec-15.3.4.3 and
http://ecma-international.org/ecma-262/5.1/#sec-15.3.4.4:
The `thisArg` value is passed without modification as the `this` value. This
is a change from
It should be ensured that the default implementation of
`Array.prototype.toLocaleString` will always produce consistent localisations
for both the list separator (by default `,`) and the array elements. For
instance, the array `[1.2, 3]` might be transformed, under `.toLocaleString`,
into
Hello,
Tonight, when playing with ES6’s new functions, I was wishing that
`Object.assign` could accept several `source` objects:
Object.assign(target, source1, source2, ...) // equivalent to
`Object.assign(Object.assign(Object.assign(target, source1), source2), ...)`
My use case: I have
Well, even it's confusing it's still better than `of` for the use case, and
some other alternatives:
Array.fromItems // fromXXX has another benifit that alternative constructors
(String.fromCharCode, Array.from) all begin with `from`
Array.fromList
Array.fromArguments
Array.newArray
Le 20 déc. 2013 à 08:36, Andrea Giammarchi andrea.giammar...@gmail.com a
écrit :
as side note: in node.js using --harmony flag ... what a developer should do
there to understand that a partially non standard version of Proxy is there
instead of the real one?
Let's imagine I am a
Le 25 déc. 2013 à 03:41, Sebastian Markbåge sebast...@calyptus.eu a écrit :
This is an esoteric and ugly use case but I'm not trolling. The default
constructor for a class which extends another is:
constructor(...args){ super(...args); }
Is there any reason it shouldn't return the
Le 26 déc. 2013 à 18:20, David Bruant bruan...@gmail.com a écrit :
Le 26/12/2013 10:58, David Bruant a écrit :
Le 26/12/2013 05:00, Rick Waldron a écrit :
On Wed, Dec 25, 2013 at 7:33 PM, David Bruant
For the rationale, the wiki states [1]:
There are many array-like objects in JS
Le 9 janv. 2014 à 12:21, Axel Rauschmayer a...@rauschma.de a écrit :
I’m still really unhappy about enumerability in ECMAScript. I find it
frustratingly inconsistent:
* At the moment, only Object.keys and the for-in loop are affected by it.
* In ECMAScript 6, Object.assign will also
Le 13 janv. 2014 à 11:45, Anne van Kesteren ann...@annevk.nl a écrit :
url.toString() == url2.toString()
Experiences on latest versions of Firefox and Safari: `url.toString()` and
`url.valueOf()` give me `[object URL]`. I expected to obtain an equivalent of
`url.href`. I haven't found
Le 13 janv. 2014 à 11:45, Anne van Kesteren ann...@annevk.nl a écrit :
In a discussion I had with Alex Russell as how to do comparison for
URL objects it ended up with desiring
url == url2
to work. It escaped me at that point that I already discussed this
briefly and Brendan explained
Le 24 janv. 2014 à 10:06, Bradley Meck bradley.m...@gmail.com a écrit :
(...) I still have to use new when invoking the generator function which
feels dirty in my mind.
Interestingly, using `new` when invoking a generator function feels cleaner in
my mind. :-) In short (and since it is
1 - 100 of 459 matches
Mail list logo