Re: System.import()?

2015-08-17 Thread Bradley Meck
The timing and extensibility is too complex to easily fit into ECMA-262, see some things mentioned in https://github.com/whatwg/loader/issues/54 . I vote no for a few years at least. On Mon, Aug 17, 2015 at 4:58 PM, Jason Orendorff jason.orendo...@gmail.com wrote: The ES6 module system is

Re: Proposal for a null coalescing operator

2015-08-17 Thread Michael McGlothlin
Another place JS would create a consideration is NaN. You might want that to play well with the operator. Possibly you could consider ?? for a wider range of nullish values and ??? for ONLY undefined. x = parseInt (a) ?? 42 x = a.nada ??? 42  Michael McGlothlin On Aug 16, 2015, at 10:32

Re: Proposal for a null coalescing operator

2015-08-17 Thread Herby Vojčík
Michael McGlothlin wrote: Another place JS would create a consideration is NaN. You might want that to play well with the operator. Possibly you could consider ?? for You've got || for wider range of nullish values. Proposal (and, in my case, personally felt need) for ?? is to only cover

Re: System.import()?

2015-08-17 Thread Isiah Meadows
I agree that it could stand to wait. Also, for what it's worth, the WHATWG loader spec is still a huge work in progress AFAIK. On Mon, Aug 17, 2015, 18:02 Bradley Meck bradley.m...@gmail.com wrote: The timing and extensibility is too complex to easily fit into ECMA-262, see some things

Re: System.import()?

2015-08-17 Thread Michael McGlothlin
Having a simple general purpose import seems a good enough goal to me. Use if or switch for conditional. Use try/catch/finally for error handling. Make everything load on first call and its lazy enough. I'd extend it to loading other content-types though. If you want to import Coffee or JSON

Re: `null` and default arguments

2015-08-17 Thread Isiah Meadows
Thanks! I understand now. On Mon, Aug 17, 2015, 17:16 Brendan Eich bren...@mozilla.org wrote: See https://esdiscuss.org/topic/default-operator-strawman-rather-than#content-13 and surrounding thread. /be Isiah Meadows wrote: I know it's a little late for this, but what was the

Re: System.import()?

2015-08-17 Thread Bradley Meck
I think we all want to find a good solution to creating a Loader for ES6 modules. I would follow WHATWG's Loader if you want to participate. There are a surprising number of considerations, particularly due to existing code bases. Node and WHATWG's Loader hook will be different, but are the only

Re: Proposal for a null coalescing operator

2015-08-17 Thread Kevin Smith
I just noticed that null/undefined was addressed in the OP, my apologies. Kevin ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Proposal for a null coalescing operator

2015-08-17 Thread Michael McGlothlin
I'd probably do something like x = y ?? ( parseInt(z) || undefined) ?? 42 Thanks, Michael McGlothlin Sent from my iPhone On Aug 17, 2015, at 5:01 AM, Herby Vojčík he...@mailbox.sk wrote: Michael McGlothlin wrote: Another place JS would create a consideration is NaN. You might want

Re: `null` and default arguments

2015-08-17 Thread Brendan Eich
See https://esdiscuss.org/topic/default-operator-strawman-rather-than#content-13 and surrounding thread. /be Isiah Meadows wrote: I know it's a little late for this, but what was the rationale of using only `undefined` instead of both that and `null` to denote omitted values for optional