It's easy to be TypeScript, they only target JS. But they can't go where Dart can.
Also, I can't imagine Google supporting TypeScript. Most big IT companies have their own language and software stack. I don't know any alternative within Google that comes anywhere near Dart in a lot of imports aspects. And I don't think Google is fooling around with Fuchsia and Flutter.
If you run your code only in a JS engine, maybe TS is more focused for what you need. But it still depends on your criteria.
IMO, anything that extends JS is a mess.
And I like Dart's dev cycle and tooling. I'm not giving that up so others find my compiled code more appealing.
My 0.02 cts :P
--
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+uns...@dartlang.org.
> AFAIK we don't even have any idea if/when Dart will get non-null or union types :-(Non-null types are undergoing experiments now: https://github.com/dart-lang/sdk/issues/27231
Non-null types are undergoing experiments now: https://github.com/dart-lang/sdk/issues/27231
On Saturday, 3 September 2016 17:45:56 UTC+1, Alec Henninger wrote:Non-null types are undergoing experiments now: https://github.com/dart-lang/sdk/issues/27231YAY!Too bad it's not coupled with union types. >.<It's fundamentally the same feature.
On Sat, 3 Sep 2016 at 20:15 Filipe Morgado <pix...@gmail.com> wrote:On Saturday, 3 September 2016 17:45:56 UTC+1, Alec Henninger wrote:Non-null types are undergoing experiments now: https://github.com/dart-lang/sdk/issues/27231YAY!Too bad it's not coupled with union types. >.<It's fundamentally the same feature.
I'm sure someone on the Dart Team (Bob?) said it would be silly not to implement it the same union types (eg. type? is just sugar for type|null) so I have faith that union types will follow on :-)
--
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+uns...@dartlang.org.
Too bad it's not coupled with union types. >.<It's fundamentally the same feature.The current experiment is focusing on syntax only, but when we get to the semantics I find it both likely and attractive to model a nullable type as a union with `Null`.
We haven't committed to user-specifiable union types at this point, though.
I'm a big fan of Dart for server-side stuff, but I do feel it's fallen way behind TS for the browser. Yes, it's semantics are nicer, but TS is on the verge of having non-null, union types and really nice type checking (narrowed types based on conditions, etc.). AFAIK we don't even have any idea if/when Dart will get non-null or union types :-(
TypeScript is (intentionally) unsound though, so that's one big thing you can get from strong Dart.
For example, if you say "message: string" in TypeScript, "message" could be absolutely anything when you (your users) run the application. And there's no guarantee of an error if it's not a string, you could get a silent implicit coercion somewhere (much) later on.
--
Yeah, I think the advantage Dart will have with non-null is we'll be able to make it the default, and have it work great with the core libraries.
Whereas JS language/libraries are a lot harder to retrofit. But yeah, they're different approaches with different tradeoffs, feel free to choose what works best for you :)
I'd rather have a language with clean semantics that targets a lot of platforms, than being semantically bound to JS.
It's easy to be TypeScript, they only target JS. But they can't go where Dart can.
Also, I can't imagine Google supporting TypeScript. Most big IT companies have their own language and software stack. I don't know any alternative within Google that comes anywhere near Dart in a lot of imports aspects. And I don't think Google is fooling around with Fuchsia and Flutter.
If you run your code only in a JS engine, maybe TS is more focused for what you need. But it still depends on your criteria.
IMO, anything that extends JS is a mess.
And I like Dart's dev cycle and tooling. I'm not giving that up so others find my compiled code more appealing.
My 0.02 cts :P
Also, you seem to focus only on the web. There I agree that JS is there to stay. There's no putting another runtime there.But, I'm using Dart mostly on the server, so I get to use the Dart runtime.And I'm looking forward to try Flutter, there's a Dart runtime there as well.
My client side is mostly Dojo (old version) and Flash. That's what I use at work, I'm too familiar with both and bad habits die hard (well Flash for mobile is hard to replace).But when I throw myself into Angular Dart and the like, I'll be glad to be able to share a lot of code with other platforms and get the same development experience.
In the end, it's not about the runtime.OK, it's nice to have a dedicated one and get at least 2x the performance of JS when we can.
It's about productivity and ease of development.Sane language semantics and unified tooling is a must.Even if it produces sub-optimal code for a single platform.Anyone who needs performance is not running in a browser anyway.
I still agree with you that TypeScript is probably a safer bet for those who only need to target the web (node.js doesn't count, it's even messier).It's no wonder it's successful.But IMO Dart offers so much more.Again ... my opinionated and speculative 0.02 cts :P
JavaScript can compete with those languages when it comes to reaching out platforms. With React Native they caneven grow outside of the browser environment. Mostly though, JavaScript is a stable platform to build on top of.
I recall Dojo. I once tried Flash and its data grid was so slow at the time. Flash was optimized for differentthings, graphics...
I'm not yet sure about what kind of code sharing we'll have with Dart. Dart is in some ways on the same boatas TypeScript, in that if you use Dart to target the browser, you may have to avoid calling code that is not availableon the browser or that messes it up.
The runtime is the reason that if Dart had it, Dart would be 2x faster than JavaScript. And without it andwhen we cross-compile to JavaScript, Dart can be 2x slower instead
A lot of people would beg to differ there. As Anders Hejlsberg said, users are quick to notice a 100msdifference. There is a story about one of the Google founders being able to tell how long a query took.Once JavaScript became fast, the DOM started to become the bottleneck. The DOM was just difficultto master. Games that chose to the DOM never worked well enough. Nowadays though there is theWebGL and who knows something might come out of it, even if mobile is strangling it.
On Wednesday, 7 September 2016 06:29:27 UTC+1, Joao Pedrosa wrote:JavaScript can compete with those languages when it comes to reaching out platforms. With React Native they caneven grow outside of the browser environment. Mostly though, JavaScript is a stable platform to build on top of.JS is here to stay, it's stable and browsers are obligated to run code written 10 years ago.But when you start a new project, or new modules, you don't care about backward compatibility.Even if the Dart language changes, the semantics are so simple that it's easy to write tools to upgrade your code.And, given that you target only browsers, you Dart code will keep running just the same.
I recall Dojo. I once tried Flash and its data grid was so slow at the time. Flash was optimized for differentthings, graphics...That DataGrid was from Flex, a full-featured but poorly written framework. That's a different beast.Flex would have been slow even if it was written in C.
I'm not yet sure about what kind of code sharing we'll have with Dart. Dart is in some ways on the same boatas TypeScript, in that if you use Dart to target the browser, you may have to avoid calling code that is not availableon the browser or that messes it up.It seems your goal is to write libraries that other people can use in the browser.In that case, Dart may not be your best choice.
I'm not familiar with DevCompiler, so maybe it could be your best choice.
But if you have your own project, you don't care about that.You can use any JS library through jsInterop.If you're alone, or in a small team, Dart makes you a lot more productive and it's a LOT easier to share code within the team.
If you're in a big team, Dart is similar to Rust, it tries to prevent interns or newcomers from crewing with you assumptions.We all know it's so easy to abuse prototype and global variables.
The runtime is the reason that if Dart had it, Dart would be 2x faster than JavaScript. And without it andwhen we cross-compile to JavaScript, Dart can be 2x slower insteadI believe there are specific case where Dart is slower than JS, specially where Dart semantics have to be preserved.
But the last time I saw an official benchmark comparison (they brought it down since then), compiled Dart code was outperforming idiomatic JS.
And I believe compiled Dart will be pretty much equivalent in the most common cases.But if you care about performance that much, maybe you shouldn't use JS O.o
A lot of people would beg to differ there. As Anders Hejlsberg said, users are quick to notice a 100msdifference. There is a story about one of the Google founders being able to tell how long a query took.Once JavaScript became fast, the DOM started to become the bottleneck. The DOM was just difficultto master. Games that chose to the DOM never worked well enough. Nowadays though there is theWebGL and who knows something might come out of it, even if mobile is strangling it.Like I said ... I doubt you'll be getting any noticeable performance difference by using Dart.And if you do, I believe the Dart team will be quick to fix it.Dart does have a heavy runtime when translated to JS.Not that heavy when compared to JQuery, and actually lighter when compared to others.But it still gets the blame.If you need a really fast load time, I agree, you shouldn't be using Dart. But you won't be using anything at all.You'll write pure HTML/CSS with minimal vanilla JS. Even then, your bottleneck are probably images.I don't see much pages that do a full fetch on every click, nowadays.Dart for the web is mostly for single-page apps.Trust me, users don't care much if the first load a little longer, as long as navigation within you site is smooth.
Anyway ...I'm guy that has written a substantial amount of code in C#/Java/PHP/JS, using a few libraries/frameworks
(JS and PHP being the ones I always cursed at).
Then, I've finally found a language that satisfies my expectations and in which I feel quite productive
Comes another guy telling me that I'm wrong, that the tool I'm using has no future, even though I'm building stuff with it right now.Of course I won't take it lightly ... specially when they're trying to sell me another tool which I cursed at quite a few time.It's amazing how emotional a programmer can get about its tools.