I can't think of a use case where defining an intermediary type wouldn't 
solve the immediate issue; philosophically I dislike naming things which 
are unimportant.

On Tuesday, December 27, 2016 at 1:08:03 PM UTC-5, Aaron VonderHaar wrote:
>
> One reason `first` and `second` are only defined for 2-tuples is that it's 
> usually a better choice to use records if you have more than a couple 
> fields.
>
> If defining a record type alias and giving names to you're fields doesn't 
> work for your situation, can you give more details about why?
>
> On Dec 27, 2016 7:09 AM, "Mike MacDonald" <[email protected] <javascript:>> 
> wrote:
>
>> On a somewhat regular basis, I end up needing to extract a single field 
>> from a tuple provided from a third-party function. At the moment, I have to 
>> write a boilerplate function just to pattern match it out. If I need the 
>> second field of tuple of a different size, I need to write more boilerplate.
>>
>> Seeing as record filed names cannot start with digits, and the language 
>> only allows up to Tuple9, it would be nice to have `.0` through `.8` as 
>> accessors to the tuple. This is symmetric with record field access 
>> "methods", and seems like a moderate ergonomic gain.
>>
>> Thoughts?
>>
>> -- 
>> 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 [email protected] <javascript:>.
>> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to