cognitect / transit-format

A data interchange format.
1.87k stars 36 forks source link

Type for sorted map with arbitrary keys? #30

Closed manuel closed 8 years ago

manuel commented 8 years ago

My app needs to transmit sorted maps. I could reuse Transit's cmap type for maps with arbitrary keys, but I think it would be safer to have a dedicated type for sorted maps.

alexanderkiel commented 8 years ago

Transit is an extensible data format. You can just create your own tag and handler for sorted maps. I can't speak for Cognitect, but I don't expect them to include such a thing as a sorted map into the core spec.

puredanger commented 8 years ago

Agreed with what Alexander said. I think sorted maps with arbitrary keys and either standard natural or custom comparator functions is not a problem that Transit is going to take on as part of the spec, at least in the short term. There are many subtle issues and not always good target types in every supported language. Instead you should add custom handlers in the languages you need.