[gathering-options] Arrow symbol
Howard Lovatt
howard.lovatt at gmail.com
Wed Jun 22 17:36:35 PDT 2011
May I make a three of suggestions:
1. Include a null argument example
2. Include a curry example
3. We include the syntax with optional () and optional {}, i.e.:
-> 42
() -> 42
x -> x + 1
(x) -> {x + 1}
(x, y) -> {
if (x > y)
return x;
else
return y;
}
x -> y -> x + y
-- Howard.
Sent from my iPad
On 23/06/2011, at 12:35 AM, Brian Goetz <brian.goetz at oracle.com> wrote:
> I would suggest also to include a multi-line example, such as:
>
> { int x, int y ->
> if (x > y)
> return x;
> else
> return y;
> }
>
> On 6/22/2011 9:43 AM, Stephen Colebourne wrote:
>> As Remi suggested, it makes sense to run a thread to suggest choices
>> for the "arrow" symbol that is part of three of the four syntax
>> families.
>>
>> - This thread is for GATHERING OPTIONS, not voting or discussing.
>> - You should only suggest an option if you personally prefer it to the
>> -> or => symbol
>> - You MUST include the two examples below converted to use your preferred symbol
>> - Suggesting a symbol does not imply that you want any syntax with an
>> arrow (ie. you can prefer strawman family, but suggest an arrow
>> symbol)
>> - Don't reply just to say "I don't want an arrow symbol"
>> - Don't reply to propose a syntax that is completely different to one
>> of the four syntax families
>>
>> Use ->
>> {x -> x + 1}
>> (x) -> {x + 1}
>>
>> Use =>
>> {x => x + 1}
>> (x) => {x + 1}
>>
>>
>> Stephen
>>
>
More information about the lambda-dev
mailing list