Can you give an example?
On 03 Jan 2015, at 03:34, Boris Zbarsky bzbar...@mit.edu wrote:
On 1/2/15 9:33 PM, Axel Rauschmayer wrote:
Do people ever
compose a property key for an object out of several pieces?
On the web? All the time.
-Boris
that in the spec. The way
I’d expect it to happen is via `Symbol.prototype[@@toPrimitive]` – it would
always throw. But that’s not the case.
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-symbol.prototype-@@toprimitive
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
:
I guess that V8 follows an old version of the spec draft. That particular
behaviour was modified in Rev 28. See:
https://bugs.ecmascript.org/show_bug.cgi?id=3252
https://bugs.ecmascript.org/show_bug.cgi?id=3252
—Claude
Le 27 déc. 2014 à 08:17, Axel Rauschmayer a...@rauschma.de
to have
to import a userland utility for such cases.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Got it, thanks!
On 25 Dec 2014, at 01:26, Brendan Eich bren...@mozilla.org wrote:
Axel Rauschmayer wrote:
The alternative is to treat enumerability the way ES6 treats holes: pretend
it doesn’t exist:
That doesn't work, here or for holes. We've actually split APIs with respect
to holes
Is there any news about `module` element, any proposal I could follow to stay
up to date?
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
That makes sense, yes. It’s great that we get this chance to clean up things in
ECMAScript 6.
On 16 Dec 2014, at 16:46, John Barton johnjbar...@google.com wrote:
1JS strict mode would look like modules.
jjb
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
Given 1JS – would strict mode have been done differently in hindsight? How?
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de mailto:a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
the line” has been answered
satisfactorily. I’d drop `Object.setPrototypeOf` and only use
`Reflect.setPrototypeOf` and `Reflect.getPrototypeOf`.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https
Will do in a few days (the other one, too). Too busy ATM.
On 30 Nov 2014, at 14:32 , Tom Van Cutsem tomvc...@gmail.com wrote:
2014-11-27 12:32 GMT+01:00 Axel Rauschmayer a...@rauschma.de
mailto:a...@rauschma.de:
Suggestion: mention in both cases that the property is an own property
2014, at 16:45 , Bradley Meck bradley.m...@gmail.com wrote:
function foo({d}={d:1}) {
}
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
for
@iter, which I knew where to look).
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
of the target object.
2. A property may not be non-configurable, if is corresponding configurable
property of the target object exists.
Question: Doesn’t #1 imply #2?
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es
] target object property is [typo: missing
“a”] non-configurable accessor property that has undefined as its `[[Get]]`
attribute.
Suggestion: mention in both cases that the property is an own property of the
target.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
choice here. Or an iterator.
[1]
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createlistfromarraylike
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo
Interesting that that matters. I wouldn’t have thought so – given that modules
export references, not values.
On 20 Nov 2014, at 01:54, Allen Wirfs-Brock al...@wirfs-brock.com wrote:
On Nov 19, 2014, at 4:42 PM, Axel Rauschmayer a...@rauschma.de wrote:
OK, I take it the following
Given that `const` is a new feature – shouldn’t an exception be thrown in
non-strict mode if a `const` variable is being changed?
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https
On 23 Nov 2014, at 13:39, Till Schneidereit t...@tillschneidereit.net wrote:
On Sun, Nov 23, 2014 at 11:58 AM, David Bruant bruan...@gmail.com
mailto:bruan...@gmail.com wrote:
Le 23/11/2014 07:41, Axel Rauschmayer a écrit :
I’d expect the following code to log `GET bla`, but it currently
to the generator from
inside the generator function?
(Also, sorry if I'm getting the nomenclature wrong, still trying to wrap my
head around the relationship between generators, iterators, and functions.)
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
function?
(Also, sorry if I'm getting the nomenclature wrong, still trying to wrap my
head around the relationship between generators, iterators, and functions.)
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es
the need for the me reference.
I agree, I can’t think of a solution that wouldn’t be much too complicated for
the minor problem that it solves.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https
target[propertyKey];
}
});
var obj = Object.create(proto);
obj.bla;
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
(([k,v], i, m) = { ... })
.collect(); // returns a new map after all transforms
```
Otherwise, I suggest to change the names (e.g. to `mapPairs` and `filterPairs`).
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es
? Is that desirable (given that it’s a frequent use
case)?
* If the purpose of the first rule is to enable default-exporting of
declarations (= no semicolon) – shouldn’t classes be included?
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
?
Please file a bug.
Will do, once I fully understand the issue.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
The subject is a SpiderMonkey bug.
Is that really desirable? Doesn’t it invalidate the Proxy’s role as an
interceptor?
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
going to be that way.
Is that true, though? Couldn’t a finalizer or something similar check (before a
promise is garbage collected) whether all errors have been handled?
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
`targetDesc`. That property
descriptor is retrieved via target.[[GetOwnProperty]], which ignores inherited
properties. Shouldn’t inherited properties be taken into consideration, too?
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss
+01:00 Axel Rauschmayer a...@rauschma.de
mailto:a...@rauschma.de:
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-proxy-object-internal-methods-and-internal-slots-get-p-receiver
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-proxy-object-internal-methods-and-internal-slots
and (e.g.)
`Construct()` could be used, but that may be too complicated a change.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
___
es-discuss mailing list
es-discuss@mozilla.org mailto:es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de mailto:a...@rauschma.de
rauschma.de
___
es-discuss mailing list
?
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
According to 11.8.3, you'll get a syntax error – they won't even be parsed,
because they are not syntactically legal.
[[[Sent from a mobile device. Please forgive brevity and typos.]]]
Dr. Axel Rauschmayer
a...@rauschma.de
http://rauschma.de
On 15.10.2014, at 10:18, Den Tuzhik dentuz
definitely not have made sense.
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-set.prototype-@@iterator
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
(...);
```
Could `throw` be turned into an expression?
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
AFAICT, `Promise.resolve()` is enough to convert jQuery deferreds to the ES6
API. Correct?
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
(Names.EMAIL, email);
requestData.set('needsReload', id);
...
```
Note that you can chain:
```js
var requestData = new Map()
.set(Names.ID, id)
.set(Names.EMAIL, email)
.set('needsReload', id);
```
Not too bad, IMO.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
Ah, thanks! Then I’d wrap the result of `entries()` in `Array.from()`. In ES7,
we’ll hopefully be able to use comprehensions or iterator helper functions.
On Oct 1, 2014, at 22:27 , Rick Waldron waldron.r...@gmail.com wrote:
On Wed, Oct 1, 2014 at 4:17 PM, Axel Rauschmayer
= one, two = true, false = three :};
const set = {. 1, two, false .};
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
when we have some actual information about what happens.
If you’re interested in following directly you can track the bug:
http://webkit.org/b/137167
—Oliver
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createresolvingfunctions
Each resolving function R uses R.[[AlreadyResolved]].[[value]] to prevent the
same promise from being resolved twice.
Question: Couldn’t R.[[Promise]].[[PromiseState]] be used, instead?
--
Dr. Axel Rauschmayer
-draft.html#sec-promise-objects
On Sep 25, 2014, at 6:49 , Axel Rauschmayer a...@rauschma.de wrote:
https://people.mozilla.org/~jorendorff/es6-draft.html#sec-createresolvingfunctions
Each resolving function R uses R.[[AlreadyResolved]].[[value]] to prevent the
same promise from being resolved
/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
As previously announced here, the current schedule is to be finished by
the end of the year, to start the publication process in March 2014 and
to have a standard by June 2014.
They already happened. Did you mean 2015?
Yes I did!
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
as a module.
Given that module files and script files have different semantics, I would
definitely want different file endings for them – for both humans and machines.
1JS doesn’t apply here.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Mail Attachment.txt___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel
this approach. That's why, shouldn't the release policy be changed
so that:
It has already changed, but not for ES6. ECMAScript 7 and later will have fixed
release dates. Only features that are ready at a given date will be included.
Background: https://github.com/tc39/ecma262
--
Dr. Axel Rauschmayer
explicitly declared as such?
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
Currently there seem to be two ways to create promises. Normal classes throw an
exception if you call them as functions (without `new`). Should `Promise` do
the same?
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss
Ah, true. Cool, thanks.
On Aug 20, 2014, at 15:23 , Rick Waldron waldron.r...@gmail.com wrote:
On Wed, Aug 20, 2014 at 8:52 AM, Axel Rauschmayer a...@rauschma.de wrote:
Currently there seem to be two ways to create promises. Normal classes throw
an exception if you call them
.
/be
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org
http://www.reddit.com/r/javascript/comments/2d4wed/can_you_explain_to_me_something_about_es6/
This should please people worried about ES6 being perceived negatively: the
tone in this thread is quite upbeat.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
be better to provide access to
[[HomeObject]] (via Reflect?).
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo
();
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
which calls
this.onTranscoded() to copy the transcoded results from load to listeners.
But my real point is why should I have to think about 'this' binding in 2015?
We don't need to use an old school API now, we have ES6.
jjb
On Mon, Aug 4, 2014 at 6:29 AM, Axel Rauschmayer
example ought to work,
then we agree ;-)
On Mon, Aug 4, 2014 at 7:47 AM, Axel Rauschmayer a...@rauschma.de wrote:
On Aug 4, 2014, at 16:33 , John Barton johnjbar...@google.com wrote:
As far as I can tell you are basically arguing that simple Loader hooks
don't need object state. Of course
Does Firefox not yet do the one binding per loop iteration? I would have
expected the output `0` in the following code.
```js
let arr = [];
for (let i of [0, 1, 2]) {
arr.push(() = i);
}
console.log(arr[0]()); // 2
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
tell, `hasOwnProperty` is mainly used to implement maps via
objects. `Map` will eliminate this use case.
* `getPropertyDescriptors` is useful for cloning objects via `Object.create()`,
where `Object.assign` can often be used in ES6.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
)
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
it make sense to
provide that as a tool function, e.g. as `Reflect.hasOwn()`?
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On Jul 26, 2014, at 6:02 , Peter van der Zee e...@qfox.nl wrote:
On Sat, Jul 26, 2014 at 5:43 AM, Axel Rauschmayer a...@rauschma.de wrote:
The only exception that comes to my mind is `{}.hasOwnProperty.call(obj,
key)` (which is the only safe way to invoke this method). Would it make
sense
in your own.
-- Alexander J. Vincent, June 30, 2001
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
Got it, thanks!
On Jul 12, 2014, at 6:14 , Domenic Denicola dome...@domenicdenicola.com wrote:
Resolving does not imply settling. For example, resolving with a
forever-pending promise.
Rejecting is a subset of resolving, by resolving with a rejected promise.
From: Axel Rauschmayer
Sent
Wouldn’t `CreateSettlingFunctions` be a better name than
`CreateResolvingFunctions` (or a similar term that is a generalization of
“rejecting” and “resolving”)?
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
On Jul 9, 2014, at 21:41 , Rick Waldron waldron.r...@gmail.com wrote:
On Wed, Jul 9, 2014 at 11:25 AM, Axel Rauschmayer a...@rauschma.de wrote:
I find the specification of template strings still a bit difficult to
understand:
– The abbreviations TV and CV are used 12.2.9, but defined
it helps with writing the specification (given proxies, generators etc.).
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
of code, but without the support of
code-focused tools such as IDEs. In an IDE, I’d simply click on an identifier
to jump to its definition. Refactoring would also be simple(r).
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss
to specify them that way?
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
', 'bar.txt');
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
{ _ as MyClass } from my-class.js;
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
, but Angular’s work on Zones may apply here, too, to
configure when and what to catch: https://github.com/angular/zone.js
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
implying?
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
of technical barriers?
As a developer currently writing ES5 code, what's the best way to try out
writing ES6 code that uses modules? Every time I try and look at
bootstrapping ES6 with modules, I can't figure it out. A Get Started Trying
It Out guide would go a long way, I feel.
--
Dr. Axel
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
, this adds
clutter. Compare these 3 forms of importing all the module lodash bindings
to an object _:
```js
var _ = require(lodash); // Node
import * as _ from lodash; // Dave's syntax
import lodash as _;
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
On Jun 19, 2014, at 16:17 , John Barton johnjbar...@google.com wrote:
Sorry to be dense, but I would appreciate more elaboration of this sentence:
On Thu, Jun 19, 2014 at 3:40 AM, Axel Rauschmayer a...@rauschma.de wrote:
This is a key sentence in David’s proposal: “ES6 favors the single
On Jun 19, 2014, at 13:36 , Michał Gołębiowski m.go...@gmail.com wrote:
On Thu, Jun 19, 2014 at 12:40 PM, Axel Rauschmayer a...@rauschma.de wrote:
This is a key sentence in David’s proposal: “ES6 favors the single/default
export style, and gives the sweetest syntax to importing the default
import MyClass from MyClass;
// myFunc.js
export default function (...) { ... };
// main2.js
import myFunc from myFunc;
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https
-binding-import semantics, that would do the trick. Interesting times.
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
{
};
// Module 'client3'
import* MyClass from 'MyClass';
```
At the moment, it seems to me like multi-export modules and single-export
modules are mixed in a way that makes things difficult to understand.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
` or `System.currentModule` would
be much better.
[1]:
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-execution-contexts
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
CommonJS-style modules could be neatly migrated to ES6 modules if this feature
was dropped.
I do agree that the ModuleImport reads a bit strange, but that could be fixed,
e.g. via a suggestion I’ve seen somewhere:
```js
import module foo from foo;
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
in the “good parts” bin, giving us the
same CommonJS/AMD world we have today, but with some vestigial syntax unused
by popular libraries.
From: es-discuss [mailto:es-discuss-boun...@mozilla.org] On Behalf Of Axel
Rauschmayer
Sent: Monday, June 9, 2014 02:39
To: es-discuss list
Subject
introduce `use
strict` for you.)
I agree. I also love tools such as the es6-module-transpiler, which allow us to
move beyond the AMD/CJS schism right now.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss
the module, it is an object that
contains, among other things, a reference to another object with the live
binding, a relative import, a relative get, etc.
Give it a different name, then. Call it `moduleDescriptor`, `moduleData`, etc.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
.
jjb
On Mon, Jun 9, 2014 at 6:39 AM, Axel Rauschmayer a...@rauschma.de wrote:
Isn't the problem, though, that default-exporting an object prevents static
checking? It feels like an abuse of this feature to me.
We don't have static checking today, so this is no loss to me.
If I
exclusively on 'module'?
jjb
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
“the module”, things would, in my
opinion, be easier to understand:
```js
import _ from Underscore;
import { flatten, union } from Underscore;
import default someFunction from single_function_module;
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
who is
currently working on the module design?
Thanks,
Kevin
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
Sorry, I tried finding it (e.g. on [1] and the mailing list), but couldn’t:
when is the currently planned publication date of ECMAScript 7?
Thanks!
Axel
[1] https://github.com/tc39/ecma262
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
It’d be nice to have a built-in way for comparing numbers, e.g. when sorting
arrays.
```js
// Compact ECMAScript 6 solution
// Risk: number overflow
[1, 5, 3, 12, 2].sort((a,b) = a-b)
// Proposed new function:
[1, 5, 3, 12, 2].sort(Number.compare)
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
a different name such as “noop” or
“doNothing”; “empty” doesn’t feel right in the context of something executable.
Also, I don’t find using an empty arrow function too bad (to me, it looks quite
intention-revealing):
```js
someAsyncMethod(() = {});
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
ambivalent about it, though: it would be useful, but would also add
complexity to the language.
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
rauschma.de
Check out my new book: SpeakingJS.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
101 - 200 of 1092 matches
Mail list logo