Re: Why is concise body for method definition dropped?

2013-06-05 Thread Brendan Eich
[Resending my 1:1 reply. /be] We decisively rejected statement-level Tennent's Correspondence Principle when I did a stand-up routine at the March 2012 TC39 meeting and thereby got arrow function syntax accepted: https://mail.mozilla.org/pipermail/es-discuss/2012-March/021872.html C/Java/JS

Re: Module syntax

2013-06-05 Thread Axel Rauschmayer
This makes a lot of sense. It would obviate the need for braces, right? > Yes, this is actually the direction I've been going in my thinking, based on > the critique that export default is the only export form that isn't a binding > form, especially when combined with a named function literal (`

Re: Minor questions on new module BNF

2013-06-05 Thread Jeff Morrison
I haven't played with Browserify too much myself (shame on me), but from my own understanding of it and after talking to a friend who is more familiar, yes I believe so. We "link" our modules statically on the server to build a dependency graph before we push to production. This linking step i

RE: Module syntax

2013-06-05 Thread Domenic Denicola
From: David Herman [dher...@mozilla.com] > Moreover, Yehuda has urged me to consider > >export x = 17; > > as sugar for > >export let x = 17; I'd urge `const` instead of `let`, as `const` discourages the footgun of action-at-a-distance mutable `with`/global-like bindings that I keep talk

Re: Module syntax

2013-06-05 Thread Matthew Robb
I really like the way this sounds, just wanted to submit my approval :D On Wed, Jun 5, 2013 at 12:37 PM, David Herman wrote: > On Jun 5, 2013, at 11:51 AM, Kevin Smith wrote: > > > It occurs to me that this is valid under the current grammar: > > > > import { default as foo } from "foo"; >

Fwd: Why is concise body for method definition dropped?

2013-06-05 Thread Brian Di Palma
Meant to send the message to es-discuss! -- Forwarded message -- From: Brian Di Palma Date: Wed, Jun 5, 2013 at 9:12 PM Subject: Re: Why is concise body for method definition dropped? To: Brendan Eich Was there any desire to support Rust style expressions if enclosed within '{

Re: Module syntax

2013-06-05 Thread David Herman
On Jun 5, 2013, at 11:51 AM, Kevin Smith wrote: > It occurs to me that this is valid under the current grammar: > > import { default as foo } from "foo"; > export { foo as default }; > > We've discussed using a well-known symbol for the default export, but this > simple desugaring migh

Re: Module syntax

2013-06-05 Thread Kevin Smith
It occurs to me that this is valid under the current grammar: import { default as foo } from "foo"; export { foo as default }; We've discussed using a well-known symbol for the default export, but this simple desugaring might be another option: import foo as "foo"; // => import {

Re: Module syntax

2013-06-05 Thread Kevin Smith
Sorry - corrections to examples: import foo from "foo"; // => import { default as foo } from "foo"; export default = expr; // => let __genident__ = expr; export { __genident__ as default }; module Foo from "foo"; Foo.default(); Thanks, { Kevin }

Re: Why is concise body for method definition dropped?

2013-06-05 Thread Yusuke SUZUKI
> > Rick, I think Yusuke was asking about this form: > class F { > f(x) x+1 > } Yes, this is what I asked. Brendan Eich wrote: > Matthew Robb wrote: > >> At one point I was under the impression that the following would produce >> an implicit return method: >> >> class x { >>

Re: Why is concise body for method definition dropped?

2013-06-05 Thread Brendan Eich
Brendan Eich wrote: Matthew Robb wrote: At one point I was under the impression that the following would produce an implicit return method: class x { method(x) x+x } We dropped it. Maybe Rick can find the meeting notes -- I'm short on time due to travel today. The problem is you must ter

Re: Why is concise body for method definition dropped?

2013-06-05 Thread Brendan Eich
Matthew Robb wrote: At one point I was under the impression that the following would produce an implicit return method: class x { method(x) x+x } We dropped it. Maybe Rick can find the meeting notes -- I'm short on time due to travel today. The problem is you must terminate with a ; or e

Re: Why is concise body for method definition dropped?

2013-06-05 Thread Matthew Robb
At one point I was under the impression that the following would produce an implicit return method: class x { method(x) x+x } On Wed, Jun 5, 2013 at 8:07 AM, Rick Waldron wrote: > > > > On Wed, Jun 5, 2013 at 10:56 AM, Matthew Robb wrote: > >> Does a concise body method still return by defa

Re: Why is concise body for method definition dropped?

2013-06-05 Thread Rick Waldron
On Wed, Jun 5, 2013 at 10:57 AM, Jason Orendorff wrote: > On Wed, Jun 5, 2013 at 9:50 AM, Rick Waldron wrote: > >> MethodDefinition : >> PropertyName ( FormalParameterList ) { FunctionBody } >> >> Still defines a "concise body", but doesn't specifically label it as such >> and PropertyDefinition

Re: Why is concise body for method definition dropped?

2013-06-05 Thread Rick Waldron
On Wed, Jun 5, 2013 at 10:56 AM, Matthew Robb wrote: > Does a concise body method still return by default? > ArrowFunction offers implicit return in the unbraced form: let two = () => 1 + 1; two(); // 2 Whereas the braced form requires an explicit return, otherwise returning the default undefin

Re: Why is concise body for method definition dropped?

2013-06-05 Thread Matthew Robb
Does a concise body method still return by default? On Wed, Jun 5, 2013 at 7:50 AM, Rick Waldron wrote: > > > > On Wed, Jun 5, 2013 at 4:45 AM, Yusuke SUZUKI wrote: > >> Hello all, >> >> I remember that ConcideBody for MethodDefinition was once introduced >> into the draft, but after that it wa

Re: Deprecating Future's .then()

2013-06-05 Thread Rick Waldron
On Wed, Jun 5, 2013 at 5:29 AM, Tom Van Cutsem wrote: > 2013/6/4 Tab Atkins Jr. > > On Wed, Jun 5, 2013 at 12:51 AM, Mark S. Miller >> wrote: >> > I am making here only an argument that .then's result behavior should be >> > flatMap-like rather than .map-like. As for which of these the .chain >

Re: Why is concise body for method definition dropped?

2013-06-05 Thread Jason Orendorff
On Wed, Jun 5, 2013 at 9:50 AM, Rick Waldron wrote: > MethodDefinition : > PropertyName ( FormalParameterList ) { FunctionBody } > > Still defines a "concise body", but doesn't specifically label it as such > and PropertyDefinition still contains the MethodDefinition-part > > Hopefully this hel

Re: Minor questions on new module BNF

2013-06-05 Thread Brendan Eich
Jeff Morrison wrote: require() is a synchronous call in to our module system, and we don't execute a given module until all of its require() dependencies have been downloaded. Hi Jeff, catching up (sorry if I missed it): do you do a browserify-style analysis for require("...") calls and hoist

Re: Why is concise body for method definition dropped?

2013-06-05 Thread Rick Waldron
On Wed, Jun 5, 2013 at 4:45 AM, Yusuke SUZUKI wrote: > Hello all, > > I remember that ConcideBody for MethodDefinition was once introduced > into the draft, but after that it was reverted. > And I have a question why it is dropped. Searching maling list, I've > found 2 threads. > > http://esdiscu

Re: Deprecating Future's .then()

2013-06-05 Thread Anne van Kesteren
On Wed, Jun 5, 2013 at 3:17 PM, Mark S. Miller wrote: > We are arguing about enough other issues that -- since this seems to be > controversial as well -- to avoid an avoidable argument, I will include all > three lists as you do here. However, for the record, I think this is silly. > There's noth

Re: Deprecating Future's .then()

2013-06-05 Thread Anne van Kesteren
On Tue, Jun 4, 2013 at 4:32 PM, Mark S. Miller wrote: > Given this direction, I think the one operation that serves as both > Promise.resolve and Promise.fulfill should be the previously suggested > Promise.of. I think you still want Promise.resolve because it makes sense with Promise.reject and

Re: Deprecating Future's .then()

2013-06-05 Thread Anne van Kesteren
On Tue, Jun 4, 2013 at 4:42 PM, Mark S. Miller wrote: > I just realized that this thread has occurred so far only on the wrong > lists. Please let's proceed from here only on es-discuss. This is a language > issue, not a browser issue. Let's please stop splitting the discussion > between two commu

Re: Deprecating Future's .then()

2013-06-05 Thread Tom Van Cutsem
2013/6/4 Tab Atkins Jr. > On Wed, Jun 5, 2013 at 12:51 AM, Mark S. Miller > wrote: > > I am making here only an argument that .then's result behavior should be > > flatMap-like rather than .map-like. As for which of these the .chain camp > > prefers for .chain's result behavior, I am neutral. Bu

Why is concise body for method definition dropped?

2013-06-05 Thread Yusuke SUZUKI
Hello all, I remember that ConcideBody for MethodDefinition was once introduced into the draft, but after that it was reverted. And I have a question why it is dropped. Searching maling list, I've found 2 threads. http://esdiscuss.org/topic/concisefunctionbody http://esdiscuss.org/notes/2012-05-2