Post by Jan MostertAt what versions wil these phases kick in and what is the approximate
timeline, 3 months, 6 months, 2 years ?
We generally avoid specific dates and timelines
<https://en.wikipedia.org/wiki/Forward-looking_statement> and are instead
milestone/feature/correctness oriented. In this specific case, the only
answer I can give is when:
(a) Strong-mode dev experience is good as or better than the current
experience
(b) All tooling (Dart VM, dart2js, included) use the new specification
(c) The old specification is updated, and we've released with little/no
bug reports
You can follow along on GitHub for Milestones 1.25 and 2.0
<https://github.com/dart-lang/sdk/milestones>.
Post by Jan MostertWe're currently on 1.23.0 and will be switching to 1.24 later this week,
we're already using a `analysis_options.yaml` file which gave us fantastic
feedback. Will the strong typing just be the analyzer getting stricter or
will this run outside the analyzer directly in the compiler?
These are really good questions!
The first "places" to implement strong-mode are the analyzer (opt-in,
via *strong-mode:
true*), and the DartDevCompiler (dartdevc, which *only* implements
strong-mode). Both the standalone Dart VM/Flutter and dart2js will also
implement strong-mode for 2.0, which means the compilers will also
understand it.
A big part of Dart 2.x is using a common front_end
<https://github.com/dart-lang/sdk/tree/master/pkg/front_end> that
understands Dart strong-mode semantics (and type inference, etc) and emits
an IR format called kernel
<https://github.com/dart-lang/sdk/tree/master/pkg/kernel>, which in turn is
used by our tools to compile to native code, VM instructions, and
JavaScript accordingly.
Some of this is based on prior art on a Dart on LLVM experiment
<https://medium.com/dartlang/dart-on-llvm-b82e83f99a70> :)
Post by Jan MostertAlso, I'm assuming, with strong typing comes type inference?
Yup!
Post by Jan MostertHow much type inference can we expect, would it be limited such as in Java
where you only get type inference in generics and lambdas or will it be
completely type inferred like in Kotlin where you can literally just write
var / val for anything and hardly ever have to think about the type?
In most code *I've* interacted with, *var, const, and final* all infer the
types correctly. There is a nice overview at the "Sound Mode Dart
<https://www.dartlang.org/guides/language/sound-dart>" (we use Sound/Strong
interchangeably, so sorry for the confusion). The tools (analyzer) are
pretty good at telling you when you need to manually annotate due to the
result being ambiguous or not inferable.
Here are the specific docs around type inference:
https://www.dartlang.org/guides/language/sound-dart#type-inference
Post by Jan MostertWith regards to Angular2/3/4, I'm guessing this strong typing will be
spilling into Angular templates as well?
Yup! In reality, we've been sort of cheating and slowly making the
AngularDart compiler use strong semantics even when inference was not yet
supported in your tools, and today AngularDart functions correctly in
DDC/Strong mode.
We have a bit more work to do to make everything 100% though (we still fall
back to dynamic calls in some situations. There is a project tracking
specific issues <https://github.com/dart-lang/angular2/projects/2> on
github.com/dart-lang/angular2.
Post by Jan MostertExciting news nevertheless, the optional-typing always felt like a
double-edged sword. A strict type system that doesn't require boilerplate
to specify types everywhere is a huge win if that's the direction Dart is
going.
On Mon, 26 Jun 2017 at 15:15 'Anders Sandholm' via Dart Announcements <
Post by 'Anders Sandholm' via Dart Announcementshttp://news.dartlang.org/2017/06/a-stronger-dart-for-everyone.html
--
Anders Sandholm | Product Manager Google Product Infrastructure & Ads |
Lead PM for Dart
--
For more news and information, visit https://plus.google.com/+dartlang
To join the conversation, visit https://groups.google.com/a/dartlang.org/
--
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
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
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
---
You received this message because you are subscribed to the Google Groups
"Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an
--
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
---
You received this message because you are subscribed to the Google Groups "Dart Misc" group.
To unsubscribe from this group and stop receiving emails from it, send an email to misc+***@dartlang.org.