Doesn't it seem strange that a Google-designed language for the future of the web (that's supposed to make development faster and easier) doesn't handle this (basic) requirement easily?
Doesn't it seem strange that a Google-designed language for the future of the web (that's supposed to make development faster and easier) doesn't handle this (basic) requirement easily?
> Doesn't it seem strange that a Google-designed language for the future of the web (that's supposed to make development faster and easier) doesn't handle this (basic) requirement easily?
I don't think it's fair to call this a basic requirement. Scala is a 10-year-old language and the state of JSON serialization is still a mess (it's taken the recent macro system to put us anywhere close to sorting it out). Converting between typed and untyped at the boundaries like this is a hard problem, not entirely solved in any language (Java has basically given up and just used reflection and annotations, which is an answer, but not a very pleasant one). I think Dart is entirely right to take it slowly and make it a matter for third-party libraries rather than a core language feature.
I think you're expecting too much from Dart. If you want a rock-solid corporate language, it's not there yet; nor is any language of comparable age. You're going to have to get your hands dirty now and again.
To find something so fundamental missing with no reasonable solution (and no information from the Dart team) is frustrating; it's not going to make selling Dart to my colleagues any easier.
Google has such a poor track record in language design, that when I was looking for a compile-to-JavaScript language I didn't even consider Dart.
http://blog.dantup.com/2014/05/web-development-sucks-and-its...
And while responding to comments, I read a little more about Dart and it started to look quite appealing. I spend too much of my day maintaining and debugging legacy JavaScript written years ago in sub-optimal ways.
However, it doesn't change that the complexity being used as an excuse is not being requested. There are many things people would want to do with their deserialisation, and nobody is asking the Dart Team to provide them all. What is really basic, however, is deserialising data into a flat PODO so that we can take advantage of code-completion and static analysis on our code; isolating the mapping problem to a single point.
It shouldn't matter?
Well, then it shouldn't matter for d2p, either. Let's argue facts, not personalities.