3 ms·
> Namespaces is something I consider a strong plus for XMPP. You may want to extend the data model at some point. You need a way to say "this is my extension, p
by joepie91_ 11y ago
> Namespaces is something I consider a strong plus for XMPP. You may want to extend the data model at some point. You need a way to say "this is my extension, please ignore it". Or at least you need it if you want multiple implementations to work together.
Sure. The problem is that in every implementation I've seen, they're unreasonably hard to work with. Giving each extension its own key in a JSON object accomplishes the same, without breaking the native data model.
> map/filter/reduce etc is possible with XML. Scala does it. Other languages can do it to. It's purely depending on your language. Even JavaScript has better XML support than the language you're portraying here :-)
Yes, it's possible, but it's too hard. It always introduces more complexity when compared to standard deserialized JSON (in any language that can natively represent the JSON data types, which seems to be most).
- TylerE 11y agoIn fairness....in some statically typed languages like Go, working with JSON isn't a ton of fun either, if you need things like optional fields.
- kuschku 11y agoWell, that’s not a limitation of statically typed languages, but a limitation of go. Just like Generics. Java, for example, does support Optional types similar to Haskell’s Maybe. Haskell in supports them, too