-- I was discussing with my colleague today about Elm and
-- i asked him about his points about static typing..
-- He said that it is difficult to write tests in static langs as
-- duck typing is easier in dynamic languages.
— I wrote some code to counter his point :
type alias User =
{ x : Int
, y : Int
}
foo p = p.x
— app code
v = foo (User 1 2)
— test code --
z = foo { x = 3 }
```
This code counters his point `BUT`
one has to stop writing `type declarations` for functions altogether or
just specify the used variables like
`foo : { x : Int } -> Int`
in above case..
What does community think about this ?
--
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.