less/dynamically typed languages. Sure, there are a lot of neat things you
get to an "on par" level of tooling compared to a statically typed language.
That isn't to say that these tools aren't useful and interesting. Just
easy to write code which will confuse the best static javascript analyser.
going to handle every situation you could devise.
Compare that with the tooling around Java. Tools don't generally get
lost. Auto complete and static analysis tools are really fantastic and
the cost of a little extra developer time worrying about types.
It all comes down to information. Tools work best when there is an
abundance of it.
On Jun 23, 2015, at 2:48 PM, 'Justin Fagnani' via Dart Misc <
JS with junk like `with` is hard to impossible to analyze, period. No
Post by Brendan Eichquestion. Dart's a lot easier!
It's not just 'with' it's open objects, open prototypes and building them
imperatively, mutable proto pointers, 'this' bindings, class expressions,
extends expressions. Reflective access (o[p]) being first class with
property screws with analysis.
Don't I know it! JS sucks, let me tell you :-P. But we're stuck with it.
Nevertheless, low-annotation and bare-JS analyzers such as DoctorJS and
Flow can cope, till they call out errors. Some people find them useful.
It'll get worse with decorators that mutate property descriptors.
Decorators that do runtime meta programming are not a done deal, FYI. Ecma
TC39 pushed back, the draft spec went back to the lab.
However, modern autocomplete tooling (the subject up-thread) does not
I never said it did
Right, Daniel J. wrote "guess" -- you wrote that most are "simple and
dumb". Re-reading up the thread, I see kc criticized Dart syntax in context
of wasm AST code, and you replied with a fine defense of Dart syntax and
how it benefits analysis. No one was arguing against that except kc.
Yet from my last exchange with Danny T., it's clear many folks still
assume JS and other dynamic languages cannot be analyzed usefully, e.g. for
autocomplete. I say that's false. Nothing against Dart in saying so, and
borderline honesty requires it. :-|
(I mentioned Closure and Tern which go to great lengths to do analysis and
inference). Their capabilities simply pale in comparison even to the Dart
analyzer, to such a degree that the comparison is silly.
Who said anything against Dart? That JS IDEs and other tools can
autocomplete and do useful albeit "pale" static checks doesn't play a zero
sum game vs. Dart. What's with the "comparison" strawman?
There is no either/or here, just people wondering about wasm and Dart.
Maybe we should pop the stack to the Subject: topic, after agreeing Dart is
easier to analyze by far than JS :-).
In personal experience, I write JavaScript full time now, and the pain is
very real. I've used almost every JS analyzer out there. They all suck (and
it's not their fault).
Have you used Flow?
I hope SoundScript and strong mode work out, they seem to be the only hope
for mainstream JS programmers.
Opinions vary -- many people like JS with just linters. Mainstream JS is what it is.
SoundScript may work out, in part by collaboration with Flow and TS.
Without collaboration and buy-in across the developer and vendor spaces, it
will fail as ES4 did.
Strong mode, I have a harder time handicapping.
But if neither SoundScript nor strong mode works out, the tool-checked
code culture of Flow, TS, and the linters will probably cope. I don't buy
that "only hope" line (it was false in Star Wars Ep. IV too ;-).
/be
--
For other discussions, see https://groups.google.com/a/dartlang.org/
For HOWTO questions, visit http://stackoverflow.com/tags/dart
To file a bug report or feature request, go to http://www.dartbug.com/new
To unsubscribe from this group and stop receiving emails from it, send an