trustedtomato / proposal-partial-expression

Function partial application, operator partial application and all that fun stuff.
10 stars 1 forks source link

Rename this proposal? #7

Closed saschanaz closed 6 years ago

saschanaz commented 6 years ago

I think a name e.g. 'Arrow Function Shorthand Syntax' would be better because this proposal essentially is to introduce a shorthand syntax for arrow functions.

trustedtomato commented 6 years ago

You can do some things with arrow functions which you can't using this syntax.

And this syntax' general use case is to partially apply an expression (generally function, operator or method), so that name wouldn't be really intuitive.

saschanaz commented 6 years ago
  1. Yeah, it's a shorthand only for (...) => expression not (...) => { statement } but I think it's okay.
  2. It's true that this proposal will be useful for the partial application but I think a name should show what it does, not what it's expected use case is.
trustedtomato commented 6 years ago

Well, actually, a function is essentially a chunk of code what has some parts which are variable (arguments). So we could call them as partial code syntax. That doesn't sound good at all. In this case, the chunk of code must be an expression => its a partial expression. So I think its perfectly valid. If we want to stay valid & we want to mention that this is a shorthand, we must call it something like "Arrow Function For Expression Shorthand Syntax (where we can't use arguments from outer functions using this syntax)" which is not a very nice name. I would rather stay with the current one.

trustedtomato commented 6 years ago

Note that the Arrow function syntax is also called Arrow function syntax rather than Function shorthand syntax :).

trustedtomato commented 6 years ago

Closing due to inactivity.