Live data from Hacker News

Announcing Dart 2 Stable and the Dart Web Platform

medium.com

101–110 of 259 posts

Re: Announcing Dart 2 Stable and the Dart Web Platform

#101
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: Python, Scala, Kotlin, etc.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#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 foundations to be both dynamic and AOT. C# might not ever achieve this?

Kotlin, Java, Swift, Objective C:

Not cross platform.

C++:

Is cross platform. No hot reload. Very unfriendly to modern development and fast iteration.

I don't actively work in mobile. I just like following developments in language technologies, so correct me if I'm wrong.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#103
post #93

Earlier quoted context omitted.

AngularDart is a hard fork. You shouldn't compare version numbers with original Angular since they are independent projects now.

I wasn't aware of this , thanks for the info. Nonetheless , the API seem to be behind the original. Hence interop with JavaScript seems incredibly messy and time consuming.

Even the APIs are not necessarily related anymore. AngularDart is an entirely independent project in every way. I'm a long-time AngularDart dev, and the JS interop thing isn't as important as you'd think. For one thing, it's actually not that hard to do, and for another, you don't need to very often at all, since Dart covers so much of what external JS packages do.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#104

Earlier quoted context omitted.

Although it's not a guarantee that it'll stick around, the fact that it's open source greatly increases the probability. GWT is actually still very much alive even though Google abandoned it years ago.

Is that something you are willing to bet a major architectural decision on and/or your career? I’ve been a Microsoft developer for over 20 years and a .Net developer for over 10. Even though I don’t see .Net “dying”, it’s also not a major growth opportunity. Java is definitely not doing well compared to .Net even though it is open source - because of the mismanagement of Oracle. I see dart going down the same road. A…

Despite the HN hate, Oracle is still doing a better service than Sun was on their dying years.

And lets not forget no one else bothered, beyond a timid attempt from IBM, which I think would have been probably worse as Java steward.

Google just hoped that Sun would have died in silence as way to settle their wrongdoings.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#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: Announcing Dart 2 Stable and the Dart Web Platform

#106

Flutter is going to make/break Dart. If flutter takes off, Dart is saved. Otherwise, looks bleak.

When do you think flutter will support running on a stock Linux system?

I believe people are working on making this work, also getting it to work in browsers.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#107
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 agree. In addition because Dart shared some superficial similarities with Java, some people just assumed it's Java and criticized the language for it. For example Dart variable declaration is of the form "String a" vs "var s:string" - the former syntax looks like Java so Dart must be Java. It certainly felt like people were willing to 'pile-on' criticism because they felt that JS ecosystem was threatened.

The language itself is very well designed and pleasurable to write code in.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#108

They should de-emphasize Dart and refocus Flutter development around Kotlin and make that a first class citizen and untangle flutter from Dart. Kotlin already is the language of choice for Android development has a very similar style to Dart (as in Dart provides few if any advantages that I'm aware off). Google already supports Kotlin in Android studio and adoption over the last few years has been enormous. Providing…

With Dart they can completely ditch the JVM and Oracle

Isn't Fuchsia going in this direction? Languages used there: C, C++, Rust, Go, Dart, Python and.. (I think that's about it), with Dart possibly mostly for the UI.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#109
Is it just me or do the first few paragraphs sound a bit desperate: “We’re relevant, really we are!”

Don’t get me wrong, there’s plenty of languages that haven’t set the world alight that are nonetheless being used by a fair few people to do worthwhile things.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#110
post #96

Earlier quoted context omitted.

To be dynamic, "Any" should be able to represent literally ANY type. As you can find, Any is a reflection-wise trait to work with static types. It's not something what you can use when you don't know type and language will dynamically convert it. You can't write fn example(foo: Any) -> u32 { foo+55 } as you CAN do in dynamic languages. Do you understand me now? Or we will keep talking about unsafe extra special types…

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.

> If the issue is that you have to downcast

It's the difference between dynamic language and language with synthetic type for reflections.

Post reply on HN