>
> So, not really sure of your point.

It's not shorter if you only use it once, but if you have some record type,
and you're repeatedly providing it with arguments, in order, it can save
you a lot of time.


> Secondly, you mention variables? To the best of my knowledge, there are no
> variables in Elm.
>
> Identifiers are probably a better name. But when you have something like
"\ x -> x + 1", we commonly refer to x as a variable.

It's not a mutable variable, but it's still a variable i.e. parameter to a
function.

Finally, it's worth mentioning that Elm values clarity over brevity. We try
not to brag about cryptic one-liners the way some Haskell people do. So, a
shortening like this will be considered, but it's very possible that it
won't get added, because the complexity it adds outweighs the brevity it
adds.

On Sun, Jul 31, 2016 at 11:20 AM, Janis Voigtländer <
janis.voigtlaen...@gmail.com> wrote:

> Andre, to your second point: Have you looked at the Elm compiler's error
> messages? They frequently talk about variables. But maybe you were lucky so
> far and didn't get many error messages. :-)
>
>
> Am Sonntag, 31. Juli 2016 schrieb Andre Bolle :
>
>> Hi Joey,
>>
>> A couple of points,
>>
>> Firstly, "type alias MyRecord = {init : Foo, view : Bar, update : Baz,
>> subscriptions : Something}"
>> followed by "Html.App.program (MyRecord init view update subscriptions )"
>> is *not* shorter than
>> the long version of Html.App.program { init = init, view = view, update =
>> update, subscriptions = subscriptions }. So, not really sure of your point.
>>
>> Secondly, you mention variables? To the best of my knowledge, there are
>> no variables in Elm.
>>
>> On Sunday, July 31, 2016 at 6:07:55 PM UTC+1, Joey Eremondi wrote:
>>>
>>> Elm currently lets you do something similar. If you have
>>>
>>>   type alias MyRecord = {init : Foo, view : Bar, update : Baz,
>>> subscriptions : Something}
>>>
>>> then you can do
>>>   Html.App.program (MyRecord init view update subscriptions )
>>>
>>> where it follows the order they were declared in the type alias.
>>>
>>> What you've described would work only in the case where:
>>> 1. every argument is a variable, not some more complicated value
>>> 2. the field names are identical to the variable names.
>>>
>>> In any other case, we wouldn't be able to infer the type of the record,
>>> which would not work in Elm.
>>>
>>> On Sun, Jul 31, 2016 at 8:03 AM, OvermindDL1 <overm...@gmail.com> wrote:
>>>
>>>> Javascript ES2015-like, would be useful.
>>>>
>>>>
>>>> On Sunday, July 31, 2016 at 3:24:25 AM UTC-6, Andre Bolle wrote:
>>>>>
>>>>> Hi,
>>>>>
>>>>> I think there might be scope for syntax reduction in the case where
>>>>> the names of functions match the names of fields in a record.
>>>>>
>>>>> e.g.
>>>>>
>>>>>    Html.App.program { init = init, view = view, update = update,
>>>>> subscriptions = subscriptions }
>>>>>
>>>>> can be written as
>>>>>
>>>>>     Html.App.program { init, view, update, subscriptions }
>>>>>
>>>>> Just an idea,
>>>>> Andre
>>>>>
>>>>> --
>>>> You received this message because you are subscribed to the Google
>>>> Groups "Elm Discuss" group.
>>>> To unsubscribe from this group and stop receiving emails from it, send
>>>> an email to elm-discuss...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> --
>> You received this message because you are subscribed to the Google Groups
>> "Elm Discuss" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to elm-discuss+unsubscr...@googlegroups.com.
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> You received this message because you are subscribed to the Google Groups
> "Elm Discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to elm-discuss+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to