Thanks for the elm-test shoutout, Nick!

It's easy to implement the foo function, let's use a more concrete example:

getName : User -> String
getName = .name

We've aliased the built-in accessor so that it may only be used on Users, not 
any record with a name field. We've also declared that this field has type 
String. 

If we ever change the User alias so that it contains firstName and lastName, we 
can change the implementation of getName to concatenate the fields rather than 
read out of the record directly.

Arguing over whether you should be specific or vague (static or duck typed) is 
a fallacy. Be specific in your interfaces and hide your implementations. Test 
the interface. 

-- 
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