> > However, strings and numbers still need to be used in production apps for > several reasons: > 1) Union Types is not supported in Json, so one needs to convert to/from > strings or numbers for communicating with other systems. > 2) Union Types are not comparable, and so cannot be used as keys in Sets > or Dicts. >
Worth noting that (1) could also be fixed by having a deriving-esque way to generate encoders and decoders automatically, so long as it worked for union types as well as records. (Granted, the serialized format is less obvious with union types compared to records.) Also worth noting that (2) is already slated to be fixed directly. It's a lower priority than other things in the hopper right now, but it'd probably still be higher priority than adding an enum feature. 😄 -- 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+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.