Live data from Hacker News

Announcing Dart 2 Stable and the Dart Web Platform

medium.com

121–130 of 259 posts

Re: Announcing Dart 2 Stable and the Dart Web Platform

#121
post #74

Earlier quoted context omitted.

With Dart they can completely ditch the JVM and Oracle

Except that Google is actually part of the OpenJDK contributors. They only have themselves to blame for Android Java. If they actually bothered to buy Sun instead of hoping it would sink in silence, the situation would be quite different and most likely cheaper than what they already spent in lawyer wages and court expenses.

> most likely cheaper than what they already spent in lawyer wages and court expenses.

Not really. They would have spent max 100 million dollars in Oracle lawsuit. Still lot less than billions to buy Sun with its mostly non-profitable crap assets.

Anyway I think Oracle seemed natural fit for Sun. The were already using in large number of their products and also selling licenses for turd technologies like J2EE app servers, portals, enterprise service buses and so on. Java EE was suppose to be big enterprise play and bring in lots of consulting revenue.

It is only recently they finally called it a day and dumped EE assets in Eclipse backyard.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#122
post #81
post #36

Reading the few comments here is really interesting. Every-time there is a discussion about Dart , people talk about Flutter... they very rarely talk about Dart on the Server or on the Web... A while ago I considered using Dart to build a Web API. I was shocked by the non-existent ecosystem around this language. The Redis package has been un-maintained for almost three years now, and Angular Dart is always a few vers…

I think what killed Dart is that they emphasized their plans to make Dart a first-class scripting language of Chrome, so that you could use instead of JavaScript. This had a lot of backlash from literally everyone, I think mostly because they were bit too hard by IE doing the exact same thing just a few years before. Only after a few years the Dart team changed courses and said "never mind about that VM-inside-Chrome…

> I think what killed Dart is that they emphasized their plans to make Dart a first-class scripting language of Chrome, so that you could use instead of JavaScript.

Funny, that's what I saw as the core attraction. The fact that they never pushed for adoption in other browsers and fell back on transpilation removed the benefit you'd get from an alternative scripting environment.

Thankfully, we now have web assembly.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#123
post #32

> The other is an interesting quality-of-life change for Flutter developers, which allows creating an instance of a class without the “new” keyword. The goal of this change is to make Flutter code more readable, less clunky, and easier to type Wait, not typing new accomplishes all those amazing things? Here i thought it was just three letters, which showed intent - hence easier to grok the surrounding code

> which showed intent - hence easier to grok the surrounding code There was some concern that removing "new" would make it less obvious that an object was being constructed. In practice, though, it's been totally fine. The fact that the thing you're invoking is a class (and hence a capitalized name) seems to be sufficient signal that "you're making an object". Also, several other languages already work this way: Pyth…

And Swift

Re: Announcing Dart 2 Stable and the Dart Web Platform

#124
post #81

Earlier quoted context omitted.

I think what killed Dart is that they emphasized their plans to make Dart a first-class scripting language of Chrome, so that you could use instead of JavaScript. This had a lot of backlash from literally everyone, I think mostly because they were bit too hard by IE doing the exact same thing just a few years before. Only after a few years the Dart team changed courses and said "never mind about that VM-inside-Chrome…

I'm on the Dart team and I agree with pretty much all of this. Personal opinion time: Lars and Kasper, the original leads and creators of the language came out very confidently with this mission to get Dart natively supported in the browser based on the assumption that the language was so good and the VM would be so fast that users would clamor it. They had the best of intentions — they really did want to make a deli…

I think a lot of what people found off-putting about Dart is that Google already recently came out with a new language that has become very successful. Announcing another one, which at first glance looks like yet another curly brace language not that far from Java, was a step too far for people to be interested.

Nowadays, the only thing driving Dart seems to be Flutter, which again is head-scratching. Like, "Flutter sounds interesting but in addition to learning Flutter I need to learn a brand new programming language for it that's really only used for Flutter?" People only have so much bandwidth for new things and there's already so much to constantly learn in our industry.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#125
post #117
post #96

Earlier quoted context omitted.

You can do that if you change it to &Any and then downcast. See the docs for examples. If the issue is that you have to downcast, then your initial claim that Rust lacks void pointers was irrelevant even if true, since you also have to downcast a void pointer in C before you can perform operations on the type that it's actually pointing to.

You can't downcast it to anything you want, it returns an Option, void pointers in C are not certainly the same, it's unsafe.

I know. That's why I said it's "a safe analogue of casting a void pointer to another type".

Re: Announcing Dart 2 Stable and the Dart Web Platform

#126
I'm really not a fan of Dart's type system. It feels ancient to me. From what I can tell, there's no sum types, I don't see any way to bound generics based on interface/typeclasses/traits or some other equivalent concept on the docs, it has no non-nullable types. Am I wrong? Why would I want to use a type system that lacks expressiveness?

Re: Announcing Dart 2 Stable and the Dart Web Platform

#127

Earlier quoted context omitted.

I believe that Google is now pushing Dart only for mobile development, and that the server-side Dart is dead on the vine. I could be wrong, but that's the impression I got.

It's not dead , we (the Dart team) just haven't had the bandwidth to invest much in it for a while. It's still supported. Most of our own tools — compiler, analysis server, formatter, etc. — are all written in Dart, so we are heavily entrenched in Dart being a good tool for command-line applications. Being a good server-side language is a little different because then the ecosystem needs get much larger. You need thi…

This is great to hear!

Re: Announcing Dart 2 Stable and the Dart Web Platform

#128
post #105
post #102

Flutter seems like the killer app that could revive Dart. In comparison: Javascript For mobile with React: no AOT compile. Relies on loading the entire JS VM which adds startup time and can require bundling a large library on Android. Cannot easily author customized components that render at native speeds. C# For mobile with Xamarin: No hot reload. Dart having its origin as a JS interpreted language had the foundatio…

How have you not used Xamarin? Hot reload is supported, C# has a REPL nowadays and there are workbooks, Swift storyboard style. There are Java AOT compilers for iOS, at least three that I can remember of. C++ with Qt/QML is very productive for mobile development.

re Xamarin:

Only reloading your XAML or CSS is supported. With Dart, you can reload all your code, in the same way JS developers have had hot reload for ages now. I'm not sure if C# will be able to support this. This really leverages Dart's roots in being interpreted, not compiled.

https://docs.microsoft.com/en-us/xamarin/xamarin-forms/xaml/...

  What changes does Live Reload redeploy?
  
  Live Reload only applies changes made to XAML or CSS. If you make changes to a C# file, a recompile will be required. Support for reloading C# is planned for a future release.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#129
post #62

Earlier quoted context omitted.

Rust has both raw void* pointers (within unsafe code) and the safe std::any::Any trait: https://doc.rust-lang.org/std/any/trait.Any.html

Trait is not a type, Any is just a custom trait. Types: https://doc.rust-lang.org/book/second-edition/ch03-02-data-t... You can create trait with name "Magic" or "Fuck" and it will not mean anything. Pointers is not a type also.

A pointer is absolutely a type in rust.

let i: u32 = 1;

let p_imm: const u32 = &i;

Look at the const u32 in the type position.

The rust book even refers to const and mut pointers as types.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#130
Dart excommunicated server side dart. If I were someone who has already been let down once by that decision and is already frustrated by the extremely lackluster library story for server side dart, why should I use dart?

Flutter is the only reason. I don't care about mobile. Hell, if they take android to flutter-only, it'll finally give me the fire to switch to iOS. I been meaning to anyways.

I'm happy that Bracha got out of there. What a shame such a bright man's work has been so foully steeped in Google nonsense.

Post reply on HN