Closed thinkbeforecoding closed 10 years ago
Again, this is an artifact from binary serialization. I should probably do this, but again this will result in performance degradation.
By the way, I would appreciate as much feedback as possible in the format implementations. This is one of the reasons why I published this as a pre-release. Keep them coming!
Fixed in 74c1b29047534ca56a7442383ff3d439e491ea1c
Excellent ! This is Great work.
A small suggestion comes to mind but I'm not sure if it's a good idea anyway:
What if we serialized cases without any values directly as a string.
Like:
type Cases =
| Something
| Another of what: string
type Container = { value: Cases }
You'd get: { value: "Something" }
or { value: { Case: "Another", what: "text" }}
...
What do you think ?
This is not possible under the current codebase as it would require explicitly moving union deserialization logic to the format implementation rather than the pickler implementation. Plus, I am not convinced as to how this would improve readability.
By the way, do you have any feedback to give wrt the xml format?
True, It would be a problem with xml...
It could be more readable to use case name instead.
thoughts ?