No, we (Dart team) recommend to deploy everything in AOT mode. JIT mode is only for development, and its performance has not been a priority for a while now.
We are done with NNBD transition for a few years now. Dart 2.12 (released March 2021) introduced null-safety. That started a 2 year transitionary period during which you could mix nullsafe (language versions 2.12 or…
> - it is truly native, in the sense I can directly talk to native APIs on each platform without going through bridging code and there's no special runtime I thought Compose Desktop is running on JVM an renders through…
> The fact that I can’t then immediately go Who said you can't? :) This actually works in Dart: Dog? dog; bool isDog = dog is Dog; if (isDog) { dog.bark(); } i.e. boolean variables which serve as witnesses for type…
The reason why languages promote variable types based on control flow is because developers en masse actually expect that to happen, e.g. facing the code like Dog? maybeDog; if (maybeDog != null) { maybeDog.bark(); } If…
In Dart 3 you have patterns and sealed class families to achieve that. See my comment above[1]. The syntax is unfortunately more verbose, but if all goes well we will address that issue this year. [1]:…
In Dart 3 instead of declaring the variable and then comparing you can simply write an if-case pattern: if (value case final value?) { // value is a fresh final variable }
In Dart you use class hierarchies instead, rather than enums (which in Dart are way to define a compile time constant set of values). So the original example becomes: sealed class MySomething<T> { } final class One…
[disclaimer: I work on Dart, though not on the language team] With primary constructors this will become something along the lines of: sealed class Message(); class IncrementBy(final int value) extends Message; class…
> it was built on top of v8 Was never built on top of V8 in any shape of form. Dart VM does not even share any code with V8. Dart 1 was designed by people who originally started V8 (Lars Bak and Kasper Lund), that's the…
It would be interesting to see 1-1 comparison with LuaJIT interpreter _without corresponding runtime changes_. That would given a meaningful baseline for how much you potentially loose/gain using this approach. Current…
> The JIT still performs better, but the AOT code starts up faster. I should update that side note because a lot of things has changed. It should probably say something like: > Theoretically, Dart VM JIT should have…
The extension has recently reached Stage 2 - most of the questions around type system have been resolved. V8 has a working implementation. We have build `dart2wasm` compiler targeting this and it shows good numbers.
We are planning to fix it some time in the future, we really only expected moderate usage of `dart2native` and only on Linux. Turns out that there is demand for using it all over the place, which includes Mac and…
> 2. Dart has optional typing, which is to say it supports type hints but is essentially dynamically rather than statically typed. Dart has not been optionally typed since Dart 2 (released in 2018).
The operator itself would throw an error. Dart is planning to have a sound non-nullability which means that if something has static type `SomeType` then it is guaranteed to be a value that is actually `SomeType` and not…
[disclaimer: I work on Dart team] Short answer: there are a lot of different editors in the world, but Dart team is not large enough and does not posses necessary expertise to develop top-notch integration with all of…
In the two experiments that we did LLVM brought only marginal benefits so we could not warrant the huge dependency and associated maintenance costs. We already have a good compilation pipeline, which was developed for…
DDC stands for Dart Development Compiler. It is a fast modular compiler that you use for quick edit&refresh development in the browser. It does not do any global optimizations, unlike dart2js - which is what you use for…
There is some information at https://mrale.ph/dartvm/ but there is nothing really comprehensive right now.
> but it also compiles to ARM binary via LLVM for iOS applications [disclaimer: I am TL for Dart Native Compilers] We currently don't use LLVM for compiling Dart to native and we actually never used it in production -…
Dart was actually really opinionated right from the start. Type annotations that has no bearing on execution; reified generics and dynamic typing at the same time; mirrors and noSuchMethod... even having semicolon - as…
> Is it possible to work with Flutter using Typescript, or is it Dart only? You might be thinking that Flutter underneath is using JavaScript - to which Dart compiles. However this is not how Flutter works, there is no…
Yes, your intuition is correct. The way it works in Dart VM is like so: Each loop has an interruption point somewhere (e.g. in the header). If a very hot loop is found VM would enter runtime at that interruption point,…
Non-nullability is actually being actively worked on[1]. Currently language team is working on specifying the feature and figuring out the path towards it. [1] https://github.com/dart-lang/language/issues/110
No, we (Dart team) recommend to deploy everything in AOT mode. JIT mode is only for development, and its performance has not been a priority for a while now.
We are done with NNBD transition for a few years now. Dart 2.12 (released March 2021) introduced null-safety. That started a 2 year transitionary period during which you could mix nullsafe (language versions 2.12 or…
> - it is truly native, in the sense I can directly talk to native APIs on each platform without going through bridging code and there's no special runtime I thought Compose Desktop is running on JVM an renders through…
> The fact that I can’t then immediately go Who said you can't? :) This actually works in Dart: Dog? dog; bool isDog = dog is Dog; if (isDog) { dog.bark(); } i.e. boolean variables which serve as witnesses for type…
The reason why languages promote variable types based on control flow is because developers en masse actually expect that to happen, e.g. facing the code like Dog? maybeDog; if (maybeDog != null) { maybeDog.bark(); } If…
In Dart 3 you have patterns and sealed class families to achieve that. See my comment above[1]. The syntax is unfortunately more verbose, but if all goes well we will address that issue this year. [1]:…
In Dart 3 instead of declaring the variable and then comparing you can simply write an if-case pattern: if (value case final value?) { // value is a fresh final variable }
In Dart you use class hierarchies instead, rather than enums (which in Dart are way to define a compile time constant set of values). So the original example becomes: sealed class MySomething<T> { } final class One…
[disclaimer: I work on Dart, though not on the language team] With primary constructors this will become something along the lines of: sealed class Message(); class IncrementBy(final int value) extends Message; class…
> it was built on top of v8 Was never built on top of V8 in any shape of form. Dart VM does not even share any code with V8. Dart 1 was designed by people who originally started V8 (Lars Bak and Kasper Lund), that's the…
It would be interesting to see 1-1 comparison with LuaJIT interpreter _without corresponding runtime changes_. That would given a meaningful baseline for how much you potentially loose/gain using this approach. Current…
> The JIT still performs better, but the AOT code starts up faster. I should update that side note because a lot of things has changed. It should probably say something like: > Theoretically, Dart VM JIT should have…
The extension has recently reached Stage 2 - most of the questions around type system have been resolved. V8 has a working implementation. We have build `dart2wasm` compiler targeting this and it shows good numbers.
We are planning to fix it some time in the future, we really only expected moderate usage of `dart2native` and only on Linux. Turns out that there is demand for using it all over the place, which includes Mac and…
> 2. Dart has optional typing, which is to say it supports type hints but is essentially dynamically rather than statically typed. Dart has not been optionally typed since Dart 2 (released in 2018).
The operator itself would throw an error. Dart is planning to have a sound non-nullability which means that if something has static type `SomeType` then it is guaranteed to be a value that is actually `SomeType` and not…
[disclaimer: I work on Dart team] Short answer: there are a lot of different editors in the world, but Dart team is not large enough and does not posses necessary expertise to develop top-notch integration with all of…
In the two experiments that we did LLVM brought only marginal benefits so we could not warrant the huge dependency and associated maintenance costs. We already have a good compilation pipeline, which was developed for…
DDC stands for Dart Development Compiler. It is a fast modular compiler that you use for quick edit&refresh development in the browser. It does not do any global optimizations, unlike dart2js - which is what you use for…
There is some information at https://mrale.ph/dartvm/ but there is nothing really comprehensive right now.
> but it also compiles to ARM binary via LLVM for iOS applications [disclaimer: I am TL for Dart Native Compilers] We currently don't use LLVM for compiling Dart to native and we actually never used it in production -…
Dart was actually really opinionated right from the start. Type annotations that has no bearing on execution; reified generics and dynamic typing at the same time; mirrors and noSuchMethod... even having semicolon - as…
> Is it possible to work with Flutter using Typescript, or is it Dart only? You might be thinking that Flutter underneath is using JavaScript - to which Dart compiles. However this is not how Flutter works, there is no…
Yes, your intuition is correct. The way it works in Dart VM is like so: Each loop has an interruption point somewhere (e.g. in the header). If a very hot loop is found VM would enter runtime at that interruption point,…
Non-nullability is actually being actively worked on[1]. Currently language team is working on specifying the feature and figuring out the path towards it. [1] https://github.com/dart-lang/language/issues/110