Earlier quoted context omitted.
does anything actually work with dart2js? All I seem to hear is people complaining about it. Given so little effort is given to it, I halfway think they should just give up on javascript and javascript interop completely and focus on making dart awesome. Anyhow, what you say is totally true, but surely iterating recursively over an object and dumping values into a json block would be trivial. The hard part is deseria…
Disclaimer: I'm the TLM of dart2js. The dart2js team is one of the teams with the most developers on it. There is a huge effort going into it. Dart2js generally does a good job, but a few features (like mirrors) that are still in beta-quality, are currently a constant source of grieve for the developers. We would have liked to delay their release until they were more stable, but several customers really, really neede…
Why Dart should learn JSON while it’s still young
21–30 of 55 posts
Re: Why Dart should learn JSON while it’s still young
#22Re: Why Dart should learn JSON while it’s still young
#23Earlier quoted context omitted.
does anything actually work with dart2js? All I seem to hear is people complaining about it. Given so little effort is given to it, I halfway think they should just give up on javascript and javascript interop completely and focus on making dart awesome. Anyhow, what you say is totally true, but surely iterating recursively over an object and dumping values into a json block would be trivial. The hard part is deseria…
Disclaimer: I'm the TLM of dart2js. The dart2js team is one of the teams with the most developers on it. There is a huge effort going into it. Dart2js generally does a good job, but a few features (like mirrors) that are still in beta-quality, are currently a constant source of grieve for the developers. We would have liked to delay their release until they were more stable, but several customers really, really neede…
Surely releasing a top quality library that works well is far more important than getting in early and releasing something that alienates developers and makes them try dart and them give up on it?
It's obviously your prerogative to do what you feel is best, but it's certainly not the choice I would have endorsed.
(I supposed the horse has bolted to a certain degree now, it's good to know that a lot of effort is being directed at dart2js I suppose, although from a developers persepective I don't really feel that it's particularly visible...)
Re: Why Dart should learn JSON while it’s still young
#24Re: Why Dart should learn JSON while it’s still young
#25Earlier quoted context omitted.
Disclaimer: I'm the TLM of dart2js. The dart2js team is one of the teams with the most developers on it. There is a huge effort going into it. Dart2js generally does a good job, but a few features (like mirrors) that are still in beta-quality, are currently a constant source of grieve for the developers. We would have liked to delay their release until they were more stable, but several customers really, really neede…
I understand you guys are working on it, and it's a tough problem, but for a flagship javascript drop in replacement isn't releasing something that griefs developers really bad ? Surely releasing a top quality library that works well is far more important than getting in early and releasing something that alienates developers and makes them try dart and them give up on it? It's obviously your prerogative to do what y…
Maybe you only see (and/or notice) people talking about corner cases that still need addressing (like azakai's sibling comment about the mapping of arbitrary precision integers to JS's number type)? For the vast majority of code, AFAIK, dart2js has no issues and emits good JS code.
I don't develop with dart, but I know a handful of developers that use dart2js to release their dart code on the web and it works just fine for them. mraleph just released IRHydra2[1], which is all Dart from top to bottom via dart2js and works really well (despite using the apparently still-nascent Dart port of Polymer).
If you have specifics, by all means, talk about them, but "All I seem to hear is people complaining about it" seems like really shaky ground from which to make comments about griefing and alienating developers.
[1] http://mrale.ph/blog/2014/01/28/prerelease-irhydra2.html
Re: Why Dart should learn JSON while it’s still young
#26Is there still people willing to use Dart instead of Javascript for web now? (no irony)
Yes. For some use cases the speed of development and rapid prototyping is worth it.
https://sublime.wbond.net/packages/Dart
Not any serious metric of course.. but a good thing anyway.. measuring technology adoption is hard and tend to give us imprecise metrics :/
Re: Why Dart should learn JSON while it’s still young
#27Dart should be JavaScript. Seriously, what's the point of Dart again?
People tended to be very sentimental about it.. because they see as a threat to javascript, as something that came to replace it.. and thats what was bad in the image that came out, when they were launching dart..
but if you leave this wrong image behind and look only to the technology achievement with it, what's not to like?
Re: Why Dart should learn JSON while it’s still young
#28The lack of easy serialization is pretty strange. Even on stodgy old non-dynamic versions of C#, YamlDotNet does a really good job of translating arbitrary objects to and from YAML/JSON just using reflection.
In a browser where code size matters, there are two ways to go:
1) In JavaScript, every library author needs to figure out how to crunch their library as much as possible and library authors brag about their small code size and minimal dependencies. We have debates about whether JQuery is worth it.
2) You implement tree-shaking so you only pay for the functions you use (GWT, Dart, and the Closure compiler's advanced mode). But tree-shaking doesn't play well with reflection, which is why dart2js reflection is a work in progress.
You can also go with code generation (essentially compile-time reflection) but that also increases compile times and adds code bloat due to the generated code.
Re: Why Dart should learn JSON while it’s still young
#29Earlier quoted context omitted.
I understand you guys are working on it, and it's a tough problem, but for a flagship javascript drop in replacement isn't releasing something that griefs developers really bad ? Surely releasing a top quality library that works well is far more important than getting in early and releasing something that alienates developers and makes them try dart and them give up on it? It's obviously your prerogative to do what y…
> releasing something that griefs developers Maybe you only see (and/or notice) people talking about corner cases that still need addressing (like azakai's sibling comment about the mapping of arbitrary precision integers to JS's number type)? For the vast majority of code, AFAIK, dart2js has no issues and emits good JS code. I don't develop with dart, but I know a handful of developers that use dart2js to release th…
- huge js file size (2MB+ easily)
- obscure hard to use js interop facilities
- very slow js interop
- broken js minification (ignored tickets)
- no older browser support
- ridiculously long compile times
I honestly welcome anyone who uses dart in a production environment to link to a blog post or explain how they worked around these, because we found they made using dart2js such a nightmare we gave up on it.I speak only for my own experience, perhaps others have different experience, but no one seems to have good things to say about the experience working with it that I can see...
(amusingly, from your link: 'Does not work in Firefox (neither Stable nor Nightly), but works in Chrome Dev and Safari.')
Re: Why Dart should learn JSON while it’s still young
#30Golang has great JSON support that I think could translate to Dart. Any overhead could be minimized through compiler support so we don't have to rely on the current mirror functionality. I think that would be a nice balance between what the author of this article is asking for and dart2js performance.
You can see the seams in the limited support for interfaces; basically there's no way to deserialize to non-empty interface type. (How would that work?)
In Dart, since any class can be extended or used as an interface type, the issues are similar to interface types in Go. There's no bare struct type.
There might be an interesting compromise, but it's not a trivial design problem.