Re: Array.create and Function.create

2019-01-10 Thread Matthew Robb
Fwiw I'd absolutely love a way to create function objects that inherit from an existing custom object. On Thu, Jan 10, 2019, 2:13 PM Sultan >what're the benefits over a object indexed by numbers `const o = > Object.create(null); o[0] = 12; ...`? > > Better "optimisable" heuristics in a similar

Re: Function Overloading or Pattern Matching of functions in Ecma

2018-10-22 Thread Matthew Robb
Perhaps the following form could eventually make sense for pattern matching in function declarations: ```js function sum_list(input, result = 0) case (input) { when [head, ...tail] -> { return sum_list(input, result + head); }, when _ -> { return result; } } ``` - M

Re: Re: Shorter syntax for arrow function assignment

2017-10-24 Thread Matthew Robb
There is practically no gain to suggest this syntax for arrows anyway as a module has no this binding you are creating a perpetually contextless function whereas using this shorthand syntax for a normal function makes some sense. You lose implicit return regardless. - Matthew Robb On Tue, Oct

Re: Consider date formatting

2017-09-21 Thread Matthew Robb
is likely the wrong place. This should probably be a browser spec as the biggest motivation is going to be localization which I find obnoxious to include in an often shipped defacto lib. - Matthew Robb On Thu, Sep 21, 2017 at 3:17 AM, Michael Kriegel < michael.krie...@actifsource.com>

Re: Re: Make comma at the end of line optional

2017-09-12 Thread Matthew Robb
Okay what would be the cons to allowing semi colons in place of commas in object literals? I have an aversion to dangling commas. They're like, On Sep 12, 2017 7:40 PM, "Jordan Harband" wrote: > I would take commas over a mixture a thousand times over; I'd do the same > with

Re: Lazy evaluation

2017-09-12 Thread Matthew Robb
ar there is > a benchmark and it proves already lazy property assignment is around 4x > faster. > > So, it's easy to say "it's not the best approach" but apparently hard to > prove that's the case? > > Looking forward to see better alternatives. > > >

Re: Re: Lazy evaluation

2017-09-11 Thread Matthew Robb
use, for example V8, to deop the object and have to build a new hidden class but only the one time. I guess it would potentially be interesting to support an own property that when undefined would delegate up the proto chain. - Matthew Robb On Mon, Sep 11, 2017 at 7:09 AM, Andrea Giammar

State of Decorators

2017-09-06 Thread Matthew Robb
Hello all! Today it struck me that the usefulness and prevalence of Decorators in my React applications has been actively climbing and this feels to be at odds with the rate of progression within the committee. To me it is quickly rising as the most influential feature to the way I write code. At

Re: Native Proxy Syntax

2017-08-23 Thread Matthew Robb
({ ... }) { ... } class MyOtherClass extends asProxy({ ... }, MyClass) { ... } ``` - Matthew Robb On Wed, Aug 23, 2017 at 11:08 AM, Vihan Bhargava <cont...@vihan.org> wrote: > The `Proxy` class is great for classes however at the moment, the current > syntax can be unwieldy: > > `

Re: Re: Defer expression

2017-08-17 Thread Matthew Robb
Yeah essentially although I'd think of it more as sugar for: (async () => { await null; ... })() On Aug 17, 2017 4:17 PM, "Tab Atkins Jr." <jackalm...@gmail.com> wrote: > On Thu, Aug 17, 2017 at 12:12 PM, Matthew Robb <matthewwr...@gmail.com> > wrote: > > H

Re: Re: Defer expression

2017-08-17 Thread Matthew Robb
Honestly have there been any proposals for something like `do async { // can await here }` which would produce a promise in the enclosing scope - Matthew Robb On Thu, Aug 17, 2017 at 11:27 AM, Logan Smyth <loganfsm...@gmail.com> wrote: > `setTimeout` it is defined in the HTML sp

Re: Re: Defer expression

2017-08-16 Thread Matthew Robb
I think this will actually get you what you're after: (async function () { await null; // Deferred code here })() On Aug 16, 2017 5:46 PM, "Darien Valentine" wrote: @logan ah, oops, that was an (incorrect) assumption about the proposed behavior on my part

Re: import.meta and TC39 process as a whole

2017-08-05 Thread Matthew Robb
>>>>>> So there’s really *nothing* stopping you from designing a proper >>>>>> System/Module/Loader/Introspect/Avocado or any subset thereof >>>>>> instead of slapping “metaproperties” on everything in sight :) >>>>>> >>>&

Re: import.meta and TC39 process as a whole

2017-08-05 Thread Matthew Robb
me to mind that we DO have a new syntactic form for private data coming in the form of private fields which use a hash prefix. It would be interesting to explore using the same syntax for module scoped private fields: ```js console.log(#dirname); ``` - Matthew Robb On Sat, Aug 5, 2017 at 12:35 P

Re: import.meta and TC39 process as a whole

2017-08-05 Thread Matthew Robb
hers, like super. Is super a keyword BTW?) > > > > > On Sat, 05 Aug 2017 at 18:03 Matthew Robb <matthew+robb+%3cmatthewwr...@gmail.com%3E>> wrote: > >> Ah but you can do: >> >> export function meta(key) { >> return import.meta[key]: >> } >&g

Re: import.meta and TC39 process as a whole

2017-08-05 Thread Matthew Robb
Ah but you can do: export function meta(key) { return import.meta[key]: } On Aug 5, 2017 11:59 AM, "Dmitrii Dimandt" wrote: > Import is already made to be a context-sensitive keyword > > I don’t think you can have a > > function x() { >import {x} from ‘module’; > } >

Re: import.meta and TC39 process as a whole

2017-08-05 Thread Matthew Robb
Can anyone knowledgeable on the topic of direct vs indirect evaluation chime in with an explanation or a link to one as my understanding is enough to "get it" but not too really explain it. On Aug 5, 2017 11:57 AM, "Dmitrii Dimandt" wrote: > Exactly! import.meta doesn’t

Re: import.meta and TC39 process as a whole

2017-08-05 Thread Matthew Robb
It all boils down to direct and indirect evaluation and static contextual information. It can't be an identifier any more than super or this. It can't be passed because it's a different type of evaluation that happens relative to static context, in this case the containing module body. You can

Re: import.meta and TC39 process as a whole

2017-08-04 Thread Matthew Robb
And here is the notes from progressing the proposal to stage 2: https://github.com/tc39/tc39-notes/blob/master/es8/2017-05/may-25.md#15iif-importmeta-for-stage-2 - Matthew Robb On Fri, Aug 4, 2017 at 9:14 AM, Matthew Robb <matthewwr...@gmail.com> wrote: > This seems to be the c

Re: import.meta and TC39 process as a whole

2017-08-04 Thread Matthew Robb
``` - Matthew Robb On Fri, Aug 4, 2017 at 9:11 AM, Matthew Robb <matthewwr...@gmail.com> wrote: > Just want to add some links to this convo: > > https://github.com/tc39/tc39-notes/blob/master/es8/2017-05/ > may-23.md#16iib-module-import-options-discussion-potentially-for-stage-1 > ht

Re: import.meta and TC39 process as a whole

2017-08-04 Thread Matthew Robb
Just want to add some links to this convo: https://github.com/tc39/tc39-notes/blob/master/es8/2017-05/may-23.md#16iib-module-import-options-discussion-potentially-for-stage-1 https://docs.google.com/presentation/d/1p1BGFY05-iCiop8yV0hNyWU41_wlwwfv6HIDkRNNIBQ/edit?usp=sharing - Matthew Robb

Re: import.meta and TC39 process as a whole

2017-08-04 Thread Matthew Robb
and some of the whys for that consensus? A different thread should be used to discuss: - TC39 process - keyword meta properties in general - API centric reflection - Module Loader features not related to module context specific meta data - Matthew Robb On Fri, Aug 4, 2017 at 3:20 AM, Dmitrii

Re: import.meta and TC39 process as a whole

2017-08-04 Thread Matthew Robb
I don't want to fan a fire and personally I've preferred other solution s for module meta data but nothing is being rushed imo. I've been closely tracking this discussion in tc39 for some years and while again some of the current front runners are not my favorite proposals they are well thought

Re: Object dynamic property with or

2017-06-15 Thread Matthew Robb
Why not this: `const { a = o.b } = o;`? On Jun 15, 2017 4:59 AM, "T.J. Crowder" wrote: FWIW, see * [`||=` is much needed?](https://esdiscuss.org/topic/is-much-needed) * [Proposal for a `null` coalescing operator](https://esdiscuss.

Re: Object Extract Method Suggestion

2017-05-08 Thread Matthew Robb
Personally I've been itching for object pattern-like pick syntax. I keep finding myself doing the following pattern: ``` const {a=1,c=2} = obj; return {a,c}; ``` On May 8, 2017 6:37 AM, "Murat Gözel" wrote: > Hey everyone, > > The idea came up while i'm filtering spesific

Re: dynamic import() polyfill + question

2017-04-22 Thread Matthew Robb
won't break >>> (shenanigans) >>> >>> TL;DR unless the following would be possible too, please consider making >>> modules available only once fully resolved through their exports >>> >>> ```js >>> import await * as mod

Re: dynamic import() polyfill + question

2017-04-22 Thread Matthew Robb
I know you probably didn't want things to go this direction in the conversation but this made me think up a generic way to do this. Why not just allow `export await` in all export syntactic forms? This would not be the same as top level await but a signal that the export will be the result of an

Re: FW: Re: Strict Relational Operators

2017-04-15 Thread Matthew Robb
Also there was once the is/isnt operators and they lasted in ES6 for a very long time and went pulled for reasons like this. On Apr 15, 2017 4:06 AM, "Isiah Meadows" wrote: > Okay, I stand corrected... (I forgot about those) > > On Sat, Apr 15, 2017, 04:01 Jordan Harband

Re: Observable/Promise parallel control flow proposal

2017-03-07 Thread Matthew Robb
to the existing promise-based abstraction and a larger extension of that which could apply to a wider range of async models such as Observable. I think both are well represented but it would be helpful to see them explicitly broken down into those two distinct sets. - Matthew Robb On Tue, Mar 7, 2017

Re: Observable/Promise parallel control flow proposal

2017-03-07 Thread Matthew Robb
the approach is treating Promise and Observable as equal edges to the problem which may be true but today we have under facilitated Promise abstractions and no one is feeling any pain/loss around missing Observable support (yet). Does any of that make sense? - Matthew Robb On Sun, Mar 5, 2017 at 8

Re: How about awaiting Arrays ?

2017-03-04 Thread Matthew Robb
Honestly Isiah my largest motivation for thinking this is worth solving boils down to the fact that async/await does a good job of hiding the promise and generator based implementation under it but this falls down so fast when adding Promise.all. I'm helping a new person learn JavaScript right

Re: How about awaiting Arrays ?

2017-03-03 Thread Matthew Robb
[...]; await.race [...]` or add a new context for `of` outside for loops but this would be limited to P.all behavior `await of [...]`? - Matthew Robb On Fri, Mar 3, 2017 at 9:47 AM, Andrea Giammarchi < andrea.giammar...@gmail.com> wrote: > If this is what we gonna have > >

Re: Proposal: Improve syntax for inline anonymous class instantiations

2017-01-06 Thread Matthew Robb
now that I re-read the original post I don't think this addresses the same scenario - Matthew Robb On Fri, Jan 6, 2017 at 5:11 PM, Igor Vaynberg <igor.vaynb...@gmail.com> wrote: > Given a simple class with an abstract method "populateItem" > > class Ar

Re: Extended dot notation (pick notation) proposal

2016-09-22 Thread Matthew Robb
lize either side of the argument but with syntax in particular I would hope that complexity additions be back-loaded into the spec rather than front-loaded onto users. I apologize FOR MY USE OF CAPS TO EXPRESS emphasis. It's a bad habit :P - Matthew Robb __

Re: Extended dot notation (pick notation) proposal

2016-09-21 Thread Matthew Robb
s from the fact that destructuring syntax and object literal shorthand syntax seem to share in a root syntax yet the two features are incompatible which makes the mental load of the restrictions more obvious. - Matthew Robb ___ es-discuss mailing list es-discuss@mo

Re: Import wildcards

2016-05-30 Thread Matthew Robb
e for usages precisely like your own. - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Import wildcards

2016-05-28 Thread Matthew Robb
Not exactly. To export a binding it must be declared in scope somewhere which means it's statically analyzable within a given file. On May 28, 2016 9:49 AM, "Maël Nison" wrote: > I see, but unless I'm mistaken, the same issue occurs with the export * > from '...' syntax,

Re: Promises, async functions, and requestAnimationFrame, together.

2016-04-26 Thread Matthew Robb
This is definitely interesting stuff. Have you considered rewriting this so that it only uses generators? If you did then you could test natively in Chrome and see if you get the same results. - Matthew Robb On Sat, Apr 23, 2016 at 7:01 PM, /#!/JoePea <j...@trusktr.io> wrote: > Jus

Re: Import wildcards on the right side of the statement

2016-04-21 Thread Matthew Robb
This could be made to work as a feature in the server side. Basically you are asking the server to give you a virtual rollup module where the body is basically just a bunch of export * from 'x';. Where even that gets sticky though is when dealing with default exports. On Apr 21, 2016 7:11 AM,

Re: Function#toString revision: JSDoc comments?

2016-04-18 Thread Matthew Robb
Could it be doable to add a separate new property or something to a function that attaches it's preceding comment content or is a "verbose" toString alternative. - Matthew Robb On Mon, Apr 18, 2016 at 11:40 AM, Andy Earnshaw <andyearns...@gmail.com> wrote: > I imagine there

Re: Save Object.observe()! (please) + make WeakMap/WeakSet observable.

2015-11-05 Thread Matthew Robb
e to a built in observable Model type on top of plain objects. - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Save Object.observe()! (please) + make WeakMap/WeakSet observable.

2015-11-04 Thread Matthew Robb
tTrapping(...)` and have this applied to all module exports/imports by default. Since modules work off bindings and not object properties. - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Save Object.observe()! (please) + make WeakMap/WeakSet observable.

2015-11-03 Thread Matthew Robb
.. I'd personally love such possibility! >> >> Regards >> >> On Tue, Nov 3, 2015 at 2:41 PM, Matthew Robb <matthewwr...@gmail.com> >> wrote: >> >>> I probably have a terrible understanding of how this all works at a low >>> leve

Re: Save Object.observe()! (please) + make WeakMap/WeakSet observable.

2015-11-03 Thread Matthew Robb
suggesting is essentially like swapping out the internal pointer of an object with another object (such as the way live module bindings work). In this way you might upgrade an existing object to behave like a proxy. - Matthew Robb On Tue, Nov 3, 2015 at 3:20 AM, Tom Van Cutsem <tomvc...@gma

Re: Decorators for functions

2015-10-20 Thread Matthew Robb
Why not just do: ``` const {myFunc} = { @someDecorator; myFunc() { } }; ``` - Matthew Robb On Tue, Oct 20, 2015 at 9:00 AM, Andrea Giammarchi < andrea.giammar...@gmail.com> wrote: > You completely misunderstood me Bob, I don't think there's any valid use > case for func

Re: Global lexical tier

2015-08-31 Thread Matthew Robb
Personally I am a fan of Chrome's CURRENT solution: ``` Uncaught SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode ``` - Matthew Robb On Mon, Aug 31, 2015 at 12:08 PM, Jason Orendorff <jason.orendo...@gmail.com > wrote: > Hi

Re: System.import()?

2015-08-19 Thread Matthew Robb
with a promise or callback. But I just work up so I may still be dreaming. - Matthew Robb On Wed, Aug 19, 2015 at 6:46 AM, Guy Bedford guybedf...@gmail.com wrote: It's great to see more interest in dynamic loading here. The contextual loader may be worth considering as a focus here

Re: System.import()?

2015-08-18 Thread Matthew Robb
as System.import but perhaps with no async wrappers? - Matthew Robb On Tue, Aug 18, 2015 at 1:11 PM, Domenic Denicola d...@domenic.me wrote: From: Jason Orendorff [mailto:jason.orendo...@gmail.com] HostResolveImportedModule is widely implemented by compilers, though not by browsers. People

Re: Syntax shortcut for accessing properties on the current context (this)

2015-07-28 Thread Matthew Robb
does it seem reasonable though that if properties get initializers in the class body that they could be considered in scope to everything else defined in the class body? On Jul 27, 2015 6:52 PM, Brendan Eich bren...@mozilla.org wrote: Michael McGlothlin wrote: I'd rather that prop just match

Re: Generalize do-expressions to statements in general?

2015-07-17 Thread Matthew Robb
? - Matthew Robb On Fri, Jul 17, 2015 at 9:27 AM, Mark S. Miller erig...@google.com wrote: I don't see a conflict between return and being an expression language. Smalltalk and E both have return. In Scheme terms, this is simply call-with-escape-continuation. Gedanken again was probably

Re: for statement with index and value

2015-07-14 Thread Matthew Robb
Why not use the new meta syntax? for (let value of values) { console.log(for.index); } - Matthew Robb On Tue, Jul 14, 2015 at 7:45 AM, Jonathan Bond-Caron jbo...@gdesolutions.com wrote: On Mon Jul 13 10:22 PM, Kevin Smith wrote: Destructuring is here to help: for (let [index

Re: Generalize do-expressions to statements in general?

2015-07-14 Thread Matthew Robb
The only gripes I have with do expressions is the inability to specify the value produced in an obvious and uniform way, also are do expressions capable of being labelled? - Matthew Robb On Tue, Jul 14, 2015 at 3:31 AM, Andreas Rossberg rossb...@google.com wrote: I don't see why you need

Instance bound class methods

2015-07-13 Thread Matthew Robb
method shorthand syntax to support the arrow: ``` class A extends React.Component { handleClick(event)= { ... } } ``` Which would be sugar for: ``` class A extends React.Component { handleClick = (event)= { ... } } ``` - Matthew Robb ___ es

Re: Instance bound class methods

2015-07-13 Thread Matthew Robb
how the machinery of this would need to be that much different than something like module bindings. - Matthew Robb On Mon, Jul 13, 2015 at 11:02 AM, Brendan Eich bren...@mozilla.org wrote: You're counting on the property assignment being moved into the constructor, where `this` is bound

Re: revive let blocks

2015-06-25 Thread Matthew Robb
I feel like this would just get confused with object destructuring. On Jun 25, 2015 5:17 PM, Herby Vojčík he...@mailbox.sk wrote: Hello! Though this is a kind of syntax is probably macroable, interesting idea appeared in my mind regarding let blocks, so I would show it here, maybe it can

Re: revive let blocks

2015-06-25 Thread Matthew Robb
Kyle's original request. - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Move es-discuss to discuss.webplatform.org?

2015-06-19 Thread Matthew Robb
Yes, please. Also if like to take issue with everyone who prefers email clients for the following reason: it's easier to allow people who want to keep using email to do so while enabling a richer and more aggressive experience for those who want it than it is the other way around On Jun 19, 2015

Re: Example of real world usage of function bind syntax

2015-06-11 Thread Matthew Robb
a feature reaches candidate stage it should be considered ready, right? - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Example of real world usage of function bind syntax

2015-06-11 Thread Matthew Robb
@Sebastian It would be interesting to explore having a defined method of deprecation for features. Basically say this bind syntax is being dropped, I'd like Babel to be able to transpile all of my SOURCE files to remove it's usage. Has anything like this been discussed before? - Matthew Robb

Re: Example of real world usage of function bind syntax

2015-06-11 Thread Matthew Robb
to use an experimental feature that it SHOULD NOT be discouraged but made clear that support may eventually land on them and/or the maintainer of the plugin for said feature or a plugin that can be used to assist in removal of the feature if the need arises.​ - Matthew Robb

Re: Example of real world usage of function bind syntax

2015-06-11 Thread Matthew Robb
On Thu, Jun 11, 2015 at 11:43 AM, Matthew Robb matthewwr...@gmail.com wrote: or the maintainer of the plugin for said feature ​To expand on this: I would also suggest that all experimental features be implemented as plugins even if doing so will cause a slow down of builds for users

Re: Example of real world usage of function bind syntax

2015-06-11 Thread Matthew Robb
could have `::` prefixed onto them to suggest that they be lightly bound method references: class X { ::Y() { } } - Matthew Robb On Thu, Jun 11, 2015 at 11:56 AM, Jordan Harband ljh...@gmail.com wrote: I find the call form of the operator (`a::b()`) very useful on its own. However, I

Re: Look-behind proposal

2015-06-09 Thread Matthew Robb
This thread is a cool example of why this list is still do important. +1 to all of it! On Jun 9, 2015 4:20 AM, Sebastian Zartner sebastianzart...@gmail.com wrote: Thank you Brendan for picking this up! Nozomu, Brendan, please let me know if I can be of any help. Sebastian On 8 June 2015 at

Re: Promise sub-class: super((resolve, reject) = this) ?

2015-06-03 Thread Matthew Robb
. As things stand, this is a thing to learn, with a workaround. What's the big deal? /be Matthew Robb wrote: If I thought I could make any money then I would most definitely bet that the changes made to classes that are at the root of this problem will be the undoing of es classes and I

Promise sub-class: super((resolve, reject) = this) ?

2015-06-02 Thread Matthew Robb
going on here? - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Promise sub-class: super((resolve, reject) = this) ?

2015-06-02 Thread Matthew Robb
of something that is EXTREMELY unexpected which is funny because the changes are supposed to be supporting subclassing of built-ins. Very disheartened :( - Matthew Robb On Tue, Jun 2, 2015 at 6:43 PM, Domenic Denicola d...@domenic.me wrote: Hmm I am pretty sure Babel et al. are correct here

Re: Re: Are ES6 modules in browsers going to get loaded level-by-level?

2015-04-23 Thread Matthew Robb
It would be great if the web app manifest included the dependency graph for the app. Something like the depCache in system js. On Apr 23, 2015 8:03 PM, Matthew Phillips matt...@bitovi.com wrote: I think the issue of round-trips is a red-herring. I spent some effort trying to optimize an es6

Re: Existential Operator / Null Propagation Operator

2015-04-06 Thread Matthew Robb
​ - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: How to fix the `class` keyword

2015-03-04 Thread Matthew Robb
impossible, correct? - Matthew Robb On Wed, Mar 4, 2015 at 12:33 PM, Dmitry Soshnikov dmitry.soshni...@gmail.com wrote: There is a trap one could fall into, after reading one classic or even authoritive book. After that it might seem one understood the essence of everything. For fairness

Re: How to fix the `class` keyword

2015-03-04 Thread Matthew Robb
today as possible? So shouldn't the question be reversed and classes should work like sugar for functions intended for use as constructors instead of breaking that model and requiring justification in a later draft to restore expected behavior? - Matthew Robb On Wed, Mar 4, 2015 at 2:03 PM, Matthew

Re: How to fix the `class` keyword

2015-03-04 Thread Matthew Robb
calling ES6 classes simple sugar on existing conventions. This is a major breaking difference in the most surface-y aspect of classes and how they are used in people's code. ​ - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https

Re: How to fix the `class` keyword

2015-03-04 Thread Matthew Robb
On Wed, Mar 4, 2015 at 2:13 PM, Matthew Robb matthewwr...@gmail.com wrote: var x = {}; X.call(x); ​Sorry this should have read: ``` var x = Object.create(X.prototype); X.call(x); ```​ - Matthew Robb ___ es-discuss mailing list es-discuss

Re: How to fix the `class` keyword

2015-03-04 Thread Matthew Robb
the language and that are not only safe TODAY but considered best practice. - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Function name property

2015-02-26 Thread Matthew Robb
On Thu, Feb 26, 2015 at 11:32 AM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: We may have a universal way for functions to self reference themselves i post ES6. ​+1 this​ - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org

Re: Function name property

2015-02-26 Thread Matthew Robb
the delete operator. You just can’t modify it using the assignment (=) operator. ​My mistake, rather than check the spec I tried it in Chrome's console and the property descriptor was configurable: false.​ - Matthew Robb ___ es-discuss mailing list es

Re: Proposal: Additional Meta Properties for ES7

2015-02-26 Thread Matthew Robb
I am positive that there will be good reasons I am just curious what they might be, why not: `function(){ function(); }` - Matthew Robb On Thu, Feb 26, 2015 at 8:00 PM, Tom Schuster t...@schuster.me wrote: I think it's easier to convey the message to never use callee instead use

Re: Proposal: Additional Meta Properties for ES7

2015-02-26 Thread Matthew Robb
Or the following three forms would be great: // normal form function(); // or function.invoke(); // additionally function.call(); function.apply(); - Matthew Robb On Thu, Feb 26, 2015 at 9:29 PM, Matthew Robb matthewwr...@gmail.com wrote: I am positive that there will be good reasons I am

Re: Re-export default?

2015-02-19 Thread Matthew Robb
​Just curious if this meets the use cases being discussed here, @caridy @jason ? ​ On Thu, Feb 19, 2015 at 9:22 AM, Matthew Robb matthewwr...@gmail.com wrote: import a from a; import b from b; export { a, b }; - Matthew Robb ___ es-discuss

Re: Re-export default?

2015-02-19 Thread Matthew Robb
Why not simply import a from a; import b from b; export { a, b }; On Feb 19, 2015 8:18 AM, Jason Kuhrt jasonku...@me.com wrote: I hear the verdict but not any substantial rationale; why is it “confusing”?’ @caridy regarding your examples for JS2016 wouldn’t this export default from

Re: Why is export default var a = 1; invalid syntax?

2015-02-18 Thread Matthew Robb
I guess the take away here is that the default export is NOT a shared binding, correct? - Matthew Robb On Tue, Feb 17, 2015 at 5:38 PM, caridy car...@gmail.com wrote: Jesse, you can do: `export default class Foo extends Backbone {}` in case you want to reference to the exported class

Re: about lightweight traits

2015-02-12 Thread Matthew Robb
to describe behavior units. - Matthew Robb On Thu, Feb 12, 2015 at 12:32 PM, Sébastien Cevey seb.ce...@guardian.co.uk wrote: I would agree. How would you use classes as traits -- are you talking about multiple inheritance? Or flattened to a linear inheritance model? On 12 February 2015 at 16:35

Re: JavaScript 2015?

2015-01-22 Thread Matthew Robb
Honestly though, to the largest portion of JavaScript developers, the least surprising name would be `JavaScript 2.0` - Matthew Robb On Thu, Jan 22, 2015 at 4:25 PM, Domenic Denicola d...@domenic.me wrote: The spec is no longer called ES6. The marketing hasn’t really begun to educate

Re: Any news about the `module` element?

2014-12-20 Thread Matthew Robb
On Sat, Dec 20, 2014 at 1:50 PM, Caridy Patino car...@gmail.com wrote: what make you think this proposal implies blocking? ​I think he was reading your examples using require() and thinking you were suggesting that the semantics would match.​ - Matthew Robb

Re: how to delay interpolation of template strings?

2014-12-16 Thread Matthew Robb
I might be wrong and either way it's probably too ugly to be serious but couldn't you, using a template tag, do something like the following: var template = compile` Hello ${first_name} `; template({ first_name: John }); - Matthew Robb On Tue, Dec 16, 2014 at 10:26 AM, Domenic Denicola d

Re: how to delay interpolation of template strings?

2014-12-16 Thread Matthew Robb
Actually, it would be cool if some sugar could be done for the example I just did: var template = compile` Hello ${{first_name}} `; template({ first_name: John }); - Matthew Robb On Tue, Dec 16, 2014 at 10:40 AM, Matthew Robb matthewwr...@gmail.com wrote: I might be wrong and either way

Re: how to delay interpolation of template strings?

2014-12-16 Thread Matthew Robb
less useful than what COULD be done there. If you were to take my example and simply remove the compile tag you'd end up with Hello first_name;​ - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: how to delay interpolation of template strings?

2014-12-16 Thread Matthew Robb
. Sometimes this list really does make me think I am crazy or something. - Matthew Robb ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: dynamic synchronous import

2014-09-28 Thread Matthew Robb
Also you CAN potentially do something like this eventually: ``` (async function() { var myMod = await System.import(my-mod); })() ``` - Matthew Robb On Sun, Sep 28, 2014 at 11:45 AM, Guy Bedford guybedf...@gmail.com wrote: On 28 September 2014 07:01, John Lenz concavel...@gmail.com wrote

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Matthew Robb
This was originally a part of the modules design but was cut due to timing. You can find what did exist on the topic here: http://wiki.ecmascript.org/doku.php?id=harmony:modules_standard - Matthew Robb On Mon, Sep 22, 2014 at 7:53 AM, Isiah Meadows impinb...@gmail.com wrote: I know

Re: Idea for Strawman: separate the core standard library itself into modules

2014-09-22 Thread Matthew Robb
functionality​ to. Ideally this would be broken down into pseudo-modular objects. This would both be easier to map to modules in the future, polyfill now, and lines up better with existing code management practices. - Matthew Robb ___ es-discuss mailing list

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
mime type such as `text/javascript-module` or something along those lines. - Matthew Robb On Wed, Sep 10, 2014 at 11:30 AM, John Barton johnjbar...@google.com wrote: A couple of months ago I tried out the suggestion by Yehuda Katz to use import syntax with special module specifiers to mean

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
On Wed, Sep 10, 2014 at 12:20 PM, Anne van Kesteren ann...@annevk.nl wrote: (I think text/javascript is just fine btw. text/* works great for HTML and CSS too. In any event, for the purposes of the browser JavaScript does not really have a MIME type. We parse anything we get...) ​The

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
module instead of script. Or the language parsing logic could say that in the presence of module syntax it will always be treated as module. I don't know if that's feasible or not *shrug* - Matthew Robb On Wed, Sep 10, 2014 at 12:21 PM, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Sep 10

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
and it would handle fetching etc then the ES6 Loader needs to be concerned with much less. If `.js` is not in any ES spec then why was there ever the idea of auto appending it to modules? I feel like this whole region of concerns is a bit mixed up right now. - Matthew Robb On Wed, Sep 10, 2014

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
There are numerous discussions about this throughout the last two years and you can find record of them throughout es-discuss. Someone closer to the topic can likely fill you in but I won't try to pull that information off the top of my head. - Matthew Robb On Wed, Sep 10, 2014 at 12:53 PM

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
Some info was discussed here: http://esdiscuss.org/notes/2014-01-28 - Matthew Robb On Wed, Sep 10, 2014 at 12:53 PM, Todd Kennedy t...@selfassembled.org wrote: On Sep 10, 2014, at 12:35, Allen Wirfs-Brock al...@wirfs-brock.com wrote: On Sep 10, 2014, at 9:28 AM, Matthew Robb wrote

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
Yeah heres a bit more in depth discussion on the topic: http://esdiscuss.org/topic/detecting-js-language-mode-for-tools#content-12 - Matthew Robb On Wed, Sep 10, 2014 at 12:53 PM, Todd Kennedy t...@selfassembled.org wrote: On Sep 10, 2014, at 12:35, Allen Wirfs-Brock al...@wirfs-brock.com

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
of those requirements. - Matthew Robb On Wed, Sep 10, 2014 at 1:03 PM, Matthew Robb matthewwr...@gmail.com wrote: Yeah heres a bit more in depth discussion on the topic: http://esdiscuss.org/topic/detecting-js-language-mode-for-tools#content-12 - Matthew Robb On Wed, Sep 10, 2014 at 12:53

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
I don't see why they have to? Traceur should be used as a build time tool that ultimately runs in legacy mode. Only REAL modern ES6 module implementations would run in this other world. Basically .es files today would be transpiled into .js files. - Matthew Robb On Wed, Sep 10, 2014 at 1:22 PM

Re: import script -- .esm

2014-09-10 Thread Matthew Robb
specially with the amount of buy in people are doing on transpilers and even buy in on other languages/runtimes such as dart. - Matthew Robb On Wed, Sep 10, 2014 at 1:33 PM, Brendan Eich bren...@mozilla.org wrote: Matthew Robb wrote: I don't see why they have to? Traceur should be used

  1   2   >