rt didn’t look like “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";
```
to me and you don’t get load-time errors, either:
```js
import "Underscore";
const _ = System.get("Underscore");
```
[^1]: https://gist.github.com/domenic/2230a7195fa0de31a227
On Jun 9, 2014, at 16:28 , John Barton wrote:
>
>
>
> On Mon, Jun 9, 2014 at 6:54 A
removed.
> jjb
>
>
> On Mon, Jun 9, 2014 at 6:39 AM, Axel Rauschmayer 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 sta
that `this` is not really 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 Rauschmay
ing at top-level and string-only, and automatically 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
and
> unbraced single-import will remain 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
ts are involved. I also don’t see how
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
eta
> capabilities, giving it a name like `module` 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.
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
prefer 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...
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
`null`. AFAICT that’s also how CoffeeScript’s existential operator works.
I’m 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 li
It'd be great if there was material on the limits of the JVM and the CLR.
AFAICT these are the only virtual machines that are trying to be universal (run
both static and dynamic languages well).
[[[Sent from a mobile device. Please forgive brevity and typos.]]]
Dr. Axel Rauschma
!
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
On 30 Apr 2014, at 21:17 , Boris Zbarsky wrote:
> On 4/30/14, 2:49 PM, Axel Rauschmayer wrote:
>> So Element.prototype is in the variable scope chain of event handlers? Wow.
>> Is this documented somewhere?
>
> You mean other than in the spec? See
> http://www.w
somewhere?
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
e perfect, but unfortunately won’t work.
Somehow, we have to put the burden on `with` and the legacy code instead of the
future-facing parts of the language.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2
here for legacy compatibility.
>> setPrototypeOf should be preferred for new code
>
> For new code, neither should be used.
>
> /Andreas
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listi
m to find it in Caja.
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
version could be used as a key to look up the international
version. You could also reorder the pieces. A bit of work for a library, but
template strings would help, a little.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
_
't be included in harmony, i'm just very
> interested in finding out what practical task they are meant to accomplish
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
--
(the page's last edit). For instance, Proxy now lives in a
>> separate @reflect module.
>>
>> Regards,
>> Tom
>>
>>
>> 2014/1/19 Axel Rauschmayer
>> http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard
>>
>> Is t
http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard
Is this the most current document on the standard modules?
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
blic, not private - ok that they leak to Proxy
> * Symbols are unique
> * Only exposed via Object.getOwnPropertySymbols instead of
> Object.getOwnPropertyKeys
> * |Object.mixin| copies both symbol and string properties
--
Dr. Axel Rauschmayer
a
Given that all upcoming value object constructors will start with lowercase
letters, shouldn’t Symbol, too?
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
* own properties.
>
> http://esdiscuss.org/topic/enumerability#content-2
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
lass, it belongs to
both. Hence, I’d use something more like a (global) function declaration:
```
function number + point2d (a, b) {
return point2d(a + b.x, a + b.y);
}
```
Or, possibly:
```
function + (a :: number, b :: point2d) {
return point2d(a + b.x, a + b.y);
}
http://www.slideshare.net/BrendanEich/value-objects
One thing is not entirely clear from the slides: Will developers be able to
define their own value object types? Without that feature I don’t see how
overloading operators would be very interesting.
Thanks!
Axel
--
Dr. Axel Rauschmayer
a
or-in style, right? That is, inherited and own non-enumerable
properties. We’ll deviate from that anyway. Independently of what enumerability
means, I can only think of cases (including Claude Pache’s pro-enumerability
example) where I would want to copy *all* own properties.
Axel
--
Dr.
to
> be improved.
Just to be clear: this one is not (necessarily) on you, you have your work cut
out for you, anyway. I’m thinking more along the lines along a companion
document. But NOTEs are a great idea, I’ll keep it in mind while reading the
spec.
Axel
--
Dr. Axel Rauschmayer
a...@rau
ncredibly important for making sense of what’s going on: The
answers and discussions on this mailing list were essential in helping me
understand the language.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
> * I can happily serialise my tree using `JSON.stringify`, and it won't
> complain that it can't handle cyclic structures. After deserialising it with
> `JSON.parse`, I just have to recursively reconstruct the `_parent`
> back-references;
> * etc.
Nice example. D
looking for a simple explanation of what enumerability will be, going
forward. If there isn’t one then I’d argue that no new feature should be
influenced by it.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
__
design of ECMAScript going forward if we had a
definitive and complete explanation of what enumerability is now and what it
should be in the future. I’m trying to make sense of it and to explain it to
others and continue to fail.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
be more useful if it didn’t
distinguish +0 and -0?
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
()`?
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Offhand, ID instead of key, but that is awfully generic. It may make sense to
invent a new term.
On Dec 22, 2013, at 6:53 , Mark S. Miller wrote:
> Suggestions?
>
>
> On Sat, Dec 21, 2013 at 9:48 PM, Axel Rauschmayer wrote:
> One problem with that method name: it overload
One problem with that method name: it overloads the term “key”. At the moment,
property keys are either strings or symbols. If a symbol can also have a key,
I’d find that confusing.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
t; https://mail.mozilla.org/listinfo/es-discuss
>
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
as surprised to find out that the majority of people prefer var +
function expression to a function declaration, because then there is only a
single kind of function definition.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
ode I could compile to for roughly the same semantics, that
> would be helpful.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://ma
les to guide syntax additions.
>
>
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
is kind of in-statement
declaration only be used for truthy/falsy tests? In loops (for-of, while), I
find this kind of thing useful, for if-then-else, much less so.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
_
Thanks! But I don’t see `function!`, anywhere.
On Nov 28, 2013, at 16:10 , Mark S. Miller wrote:
> http://wiki.ecmascript.org/doku.php?id=strawman:async_functions
>
> cheers, MarkM
>
> On Nov 28, 2013 12:34 AM, "Axel Rauschmayer" wrote:
> In the most recent mee
#410-generator-arrow-function-syntax
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es
Source: David Herman,
https://github.com/rwaldron/tc39-notes/blob/master/es6/2013-11/nov-20.md
Can someone elaborate? I don’t see an alternative.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
g notes, too?
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Can you tell me where to do that? Or is test262 a better way to fix this
(assuming that it is run regularly on V8 and SpiderMonkey)?
On Nov 23, 2013, at 17:15 , Mark S. Miller wrote:
> Hi Axel, please file bugs against Firefox and V8.
>
>
> On Sat, Nov 23, 2013 at 2:24 AM, Axel
It does indeed. I just checked in Safari and got an exception.
Thanks,
Axel
On Nov 23, 2013, at 11:00 , Yusuke SUZUKI wrote:
> JavaScriptCore implements it correctly.
>
> ---
> Regards,
> Yusuke Suzuki
>
>
> On Sat, Nov 23, 2013 at 6:24 PM, Axel Rauschmayer wrote:
mode).
```js
(function () { 'use strict'; var s=''; s.foo=3 }());
```
But it doesn’t (not on Firefox and V8).
[1] http://ecma-international.org/ecma-262/5.1/#sec-8.7.2
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rausc
Well, strike that. I misunderstood what the operation does. Sorry.
On Nov 22, 2013, at 21:36 , Axel Rauschmayer wrote:
> Not sure it matters, but: table 15 is incomplete. Four trues are missing.
>
> --
> Dr. Axel Rauschmayer
> a...@rauschma.de
>
> home: rauschma.de
&
Not sure it matters, but: table 15 is incomplete. Four trues are missing.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https
In the ES5 spec PDF, there were convenient links from the ToC to the content.
In the ES5.1 spec, they are gone. Is there a way to bring them back?
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
> functions making "function" a legacy
My hope, too.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
>> Is the value of `src` a module ID or a path? How about when packages are
>> used (for bundling)? Is there a way to combine module IDs and packages?
>
> For the most part the answer to these kinds of questions is that we support
> "all of the above," but I'd like to wait just a little bit long
On Nov 17, 2013, at 6:14 , David Herman wrote:
>> Does this imply ?
>
> Works either way, inline or external. (Requiring src="" is one of the reasons
> why
Caveat: with yield*, you want generators to be more like functions than like
blocks.
[[[Sent from a mobile device. Please forgive brevity and typos.]]]
Dr. Axel Rauschmayer
a...@rauschma.de
Home: http://rauschma.de
Blog: http://2ality.com
On 16.11.2013, at 10:28, "Claus Reinke&qu
's original examples.
Ah, missed that. Thought it was *=>. I don’t mind either way, my (admittedly
weak) mnemonic would be “asterisk after function-defining token”.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
_
.html('Download complete.');
yield status.fadeIn().promise();
yield sleep(2000);
status.fadeOut();
});
```
[Example taken from task.js website.]
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
__
spec. as a special form of generator function).
>
> I also need to think a bit about whether there might be any this binding
> issues.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
e actual argument count. For example, one possibility would be
> to allow the last item of any formal parameter list to be an item of the
> syntactic form:
>
> ActualArgumentCount : '#' BindingIdentifier
>
> So, the declaration for splice could then b
strictness (compared to normal
blocks + `let`).
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
On 05 Nov 2013, at 6:35 , Mark S. Miller wrote:
> On Mon, Nov 4, 2013 at 11:21 AM, Axel Rauschmayer wrote:
> My bad: I should have made it clear that I wanted top-level blocks in strict
> mode. Modules are implicitly in strict mode, normal code blocks aren’t. I was
> looking
5:36 AM, Axel Rauschmayer wrote:
>> What is the best way to create top-level scopes in ES6?
>
> I guess I am probably missing something important, but I thought you
> could just write a block and use `let` in it:
>
>{
>let foo = ...;
>...
>}
>
&
el
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
nical computing if it introduces additional difficulties.
>
> With ES6 and these operators I believe JS/NodeJS could easily take over the
> technical and statistical computing domains.
>
> Tristan
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twit
Another reason: you can’t have empty generators without marking them in some
manner.
> On Sat, Oct 26, 2013 at 1:01 PM, Lucio Tato wrote:
> It's really needed to make js syntax more complex in order to implement
> generators?
> It's function* really needed?
>
-
on`.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
bility-wise).
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
nd why one would want
to have default values in an order that is neither #1 nor #2.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
ed on this point.
Thanks! I didn’t look at the spec section, I (incorrectly) assumed I knew how
they worked. Then I don’t see a use case for this, I’d find it confusing.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
__
be useful. For example:
```js
function getRandomInteger(lower = 0, upper) {
return Math.floor(Math.random() * (upper - lower)) + lower;
}
```
Implementing this function in some other manner is much more complicated.
But I agree that you want to name parameters if there are more than 2
available in both sloppy and strict mode
(right?). That seems like a pretty good solution (I also would have been OK
with only having ES6 features in strict mode).
Thanks!
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
alue, done} creates another problem - heap pollution, this:
>
> var counter = 0;
> for( var n of Range(0,10) )
> ++counter;
>
> should not cause heap allocations. In case of protocol you've described
> {value, done} object gets allocated. And I suspect it is so on ea
The problem is that you have to bite the bullet of syntactic inconvenience for
either default imports or normal imports. I’d prefer the syntax you suggested,
but there seem to be many people who want to make default imports as simple as
possible.
--
Dr. Axel Rauschmayer
rauschma.de
[Sent from
JS and then load modules conditionally? But
that seems like a more complicated solution. I’m not even sure how I would
implement the detection part.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ali
Quick, possibly silly idea: What if `typeof null` returned `undefined`?
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https
:45 , Brendan Eich wrote:
> Axel Rauschmayer wrote:
>>> The fact that s.match(/re/g) returns the array of all matches (with
>>> captures) sucks some of the oxygen away from any /re/g.execAll(s) proposal.
>>>
>>> But String.prototype.match has perlish hair (
exec()`.
Ideas:
– execMulti()
– execIter()
`execAll()` may not be that bad. It’s not pretty, but it’s fairly easy to guess
what it does (*if* one know what the normal `exec()` does).
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
b
ly the complete matches (group 0) are returned.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
could include parens, braces and
brackets.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
Suggestion: a named parameter `ignoreCase`:
$ 'hello world'.contains('WORLD')
false
$ 'hello world'.contains('WORLD', { ignoreCase: true })
true
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitte
teratables?
It would be lovely to have a module with tool functions for this, similar to
Python’s itertools.
http://docs.python.org/3/library/itertools.html
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
_
it through list() first.
>
> Similarly, in JS you'd just pass it through Array.from() first.
Additional option:
```js
var arrayOfMatches = [ .../foo/.execMultipleLazy('str') ]
```
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blo
etIterator(obj) and
> Reflect.defineIterator(obj, getIterator) for that?
There will be a public symbol (that you can import from a system module) that
will allow you to do both things.
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.co
An example to make things clearer (thanks for the suggestion, Domenic):
https://gist.github.com/rauschma/6330265
On Aug 24, 2013, at 21:43 , Axel Rauschmayer wrote:
> Well, obviously it doesn’t make much sense to do that for `text()`, but it
> would be great to have for `exec()`.
>
Well, obviously it doesn’t make much sense to do that for `text()`, but it
would be great to have for `exec()`.
On Aug 24, 2013, at 21:39 , Axel Rauschmayer wrote:
> At the moment, the following two methods abuse regular expressions as
> iterators (if the /g flag
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
12.3853
> http://devsmash.com
> @jmar777
>
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/
ifier binding]".
I agree. `+` may be a better choice (reminiscent of regular expressions as
opposed to the boolean operator). Then the code becomes:
let { +a: foo, b: bar } = { a: 1 }; // foo = 1, b = undefined
let { +a: foo, b: bar } = { }; // exception
function bla(+mandatoryA
declaratively specify a minimum arity).
Then destructuring assignment and parameter handling would work very similarly.
function bla(!mandatoryArg, optionalArg1, optionalArg2 = 123) {
...
}
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com
} from "crypto"; // re-exporting specified
exports from another module
That seems redundant. Maybe one could mark things that should be re-exported
when importing them? On the other hand, this may be rare enough that it doesn’t
warrant the extra syntax.
--
Dr. Axel Rauschmay
not ES7. First, operators for value objects.
Makes sense. Maybe the syntax/API for setting up operators can be designed in a
way that keeps the option open of adding complete multiple dispatch later (or
via a library).
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.c
).
MD is very useful for working with data (web services, JSON, etc.), where you
don’t want to (or can’t) encapsulate behavior with data. Design-wise, they make
functions aware of object-orientation so that you can use them to implement
algorithms that span multiple classes (as binary op
d combine single dispatch and multiple dispatch to
implement the DCI ideas):
http://www.artima.com/articles/dci_vision.html
On Jul 29, 2013, at 0:41 , Brendan Eich wrote:
> Axel Rauschmayer wrote:
>> Suggestion: put this evolving spec into a Gist or something similar.
>
> Defi
it and singular, contrary to reality in browsers).
>
> /be
> ___
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss
event listener with the current loader, but haven’t found
anything in the loader API.
Axel
--
Dr. Axel Rauschmayer
a...@rauschma.de
home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com
___
es-discuss mailing list
es-discuss@mozilla.org
https
gt; didn't agree on a method or getter. Hence the need for a standard :-)
> Array.prototype.first could work too.
>
> David
>
> [1] https://twitter.com/angustweets/status/359827047117373443
> ___
> es-discuss mailing list
>
an
>> having zero params (due to paranthesis requirement).
>>
>> I think the semicolon hazard is enough to make omitting the body
>> questionable, but omitting the params is an easy win with no downside.
>> ___
>>
201 - 300 of 1233 matches
Mail list logo