--
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.
This doesn’t address his problem at all. He is not looking for a way to handle more than eight fields, he is looking for a way to write down the “combination function” (like Location
in the library’s example for (|:)
) in the case where it’s not just a constructor for a non-extensible record type, but for an extensible one.
No, you didn’t. He is looking for something more elegant than having to write his own constructor functions (with 10-15 arguments). Using the apply function from elm-json-extra
doesn’t provide this. If you think it does, can you please give an example?
technician.base.base.timeStatistics.avg
technician.base.base.timeStatistics.max
--
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+unsubscribe@googlegroups.com.
Another solution, one which developers it seems tend towards, is using extensible types to represent the states:```type alias PersonBase a ={ a| id : Int, name : Int}type alias Person =PersonBase { address : Address }type alias HomelessPerson =PersonBase {}```This enables us to give raise decoding errors, and to make impossible states impossible. It becomes unwieldy very fast to start creating the constructors for when the records grow in size.