HackerTrans
TopNewTrendsCommentsPastAskShowJobs

retepna

no profile record

comments

retepna
·3 ปีที่แล้ว·discuss
Thank you, that's indeed a better way to model it!
retepna
·3 ปีที่แล้ว·discuss
I can relate to most points in the article but definitely not #4. I'm a newbie and Elm's ways of declaring types are confusing to me. There are custom types, type aliases, records, extensible records, opaque types, phantom types, wrapper types [1]. However, I still wasn't [2] able to model a list of items with a common base type without having to switch-case through all possible types.

[1]: https://gist.github.com/JoelQ/6b303d9ad450537163b6f8f6cf8a4e... [2]: https://ellie-app.com/mQ52TY6k3zZa1