--
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 email to misc+uns...@dartlang.org.
I think it's worthwhile to point out that the theory of Dart can be that it is _capable_ of maintaining a sound heap. It relies on checked mode execution and the absence of "reified dynamic objects" (such as instances of `List<dynamic>`), and it requires a tiny twist on function type subtyping (it should be changed to require covariant return types).
On Monday, October 5, 2015 at 2:01:06 PM UTC+1, Erik Ernst wrote:I think it's worthwhile to point out that the theory of Dart can be that it is _capable_ of maintaining a sound heap. It relies on checked mode execution and the absence of "reified dynamic objects" (such as instances of `List<dynamic>`), and it requires a tiny twist on function type subtyping (it should be changed to require covariant return types).Do developers understand or care about this theory? Has the Dart team communicated/sold this theory to developers? And most importantly for mobile - does the checked mode sound heap offer performance advantages. Currently I think production mode does not - or is that wrong?
--
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 email to misc+uns...@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
To unsubscribe from this group and stop receiving emails from it, send an email to misc+uns...@dartlang.org.
I had already forgotten that "var" stands for "dynamic". The plugin for intellij/webstorm offers (guessed) code completion based on type inference.
I do not understand the purpose of "checked mode" either.
How or when will "strong mode" be available for the IDE (eclipse, intellij) ?
Could "strong mode" allow the compilation of Dart programs into efficient native executables that do not require the VM ?
Am Montag, 5. Oktober 2015 16:32:53 UTC+2 schrieb Benjamin Strauß:In hindsight I think maybe it would have been better if typed code would always be running in checked mode. I think many developers struggle with the idea of an unsound typesystem. I once tried to explain it to someone, it took me an hour, after which I gave up. Some people have been living in the typed world for so long, they have problems to grasp other concepts.I think the simpler approach would have worked better, while keeping the current semantics (no type overloading, etc.):typed code -> has to be sounduntyped code/type dynamic -> works like javascriptAm Montag, 5. Oktober 2015 15:33:27 UTC+2 schrieb Erik Ernst:On Mon, Oct 5, 2015 at 3:14 PM, kc <kevin...@gmail.com> wrote:
On Monday, October 5, 2015 at 2:01:06 PM UTC+1, Erik Ernst wrote:I think it's worthwhile to point out that the theory of Dart can be that it is _capable_ of maintaining a sound heap. It relies on checked mode execution and the absence of "reified dynamic objects" (such as instances of `List<dynamic>`), and it requires a tiny twist on function type subtyping (it should be changed to require covariant return types).Do developers understand or care about this theory? Has the Dart team communicated/sold this theory to developers? And most importantly for mobile - does the checked mode sound heap offer performance advantages. Currently I think production mode does not - or is that wrong?I think developers can _benefit_ from caring about guaranteed properties of program executions. In this case it would be "in checked mode you can trust all type annotations", which should be useful for programmers to have in mind, even if they are not the kind of people who would want to go and prove it.With respect to the performance advantages: As soon as checked mode checks are turned off it becomes (essentially) impossible to promise heap soundness, so you couldn't generate code that relies on it. The obvious alternative would be to eliminate as many checked mode checks as possible (based on strictly guaranteed properties of the execution), and then tolerate the runtime costs of the remaining checks in return for having performance benefits based on heap soundness.You might want to take a look at the work on strong mode (https://github.com/dart-lang/dev_compiler/blob/master/STRONG_MODE.md) where many of the same ideas have been applied.best regards,--Erik Ernst - Google Danmark ApSSkt Petri Passage 5, 2 sal, 1165 København K, DenmarkCVR no. 28866984
--
For what it's worth, your timeline of these two is backwards:* C# eventually acquires 'dynamic' under pressure from these langs.* C# evolves in a functional direction via @headinthebox with Linq, var, anon objects. Dev's seem to prefer it to 'dynamic'LINQ was in C# 3.5, `dynamic` was in C# 4.
On Monday, October 5, 2015 at 4:56:30 PM UTC+1, John Messerly wrote:For what it's worth, your timeline of these two is backwards:* C# eventually acquires 'dynamic' under pressure from these langs.* C# evolves in a functional direction via @headinthebox with Linq, var, anon objects. Dev's seem to prefer it to 'dynamic'LINQ was in C# 3.5, `dynamic` was in C# 4.Right - got the timeline wrong. But I think the point stands that dev's preferred the 'functional static' rather than the 'dynamic' approach to development.