Live data from Hacker News

Announcing Dart 2 Stable and the Dart Web Platform

medium.com

71–80 of 259 posts

Re: Announcing Dart 2 Stable and the Dart Web Platform

#71
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

You'd be surprised. In Flutter you construct new objects _all the time_ and mostly inline (think React without JSX). The `new`'s really do get tedious when you're making a tree like:

    Container(
      child: Column(
        children: [
          Text("One"), 
          Text("Two"), 
          Text("Three"),
        ]
      )
    )
It's not major but I don't think your quote is overselling it either. It is a quality-of-life change that does those things.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#72
post #66

Earlier quoted context omitted.

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.

Pointers are certainly types in Rust, and although it's of course true that the Any trait is not itself a type, a reference to an Any trait (which is what you'd actually pass around) is a type.

Well, you can repeat it many times but it will not become true. I gave you link to the list of Rust types. Pointers are pointers, not types. Traits can have any name, their names mean nothing.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#73

Earlier quoted context omitted.

And the server component of iTunes and the App Store is written in WebObjects.....

WebObjects isn't open source, Dart is.

How has the open source nature of Dart helped so far?

Open source is not a panacea for a project that’s not popular and doesn’t have an active vibrant community around it.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#74

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

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.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#75
post #55

As someone trying to make his first mobile app, I just ran through the Flutter getting started guide and it was a much better experience than getting a React-Native hello world going. Just a couple pros I see: * flutter doctor - what a helpful tool! * hot reload without losing state!? If Dart can use my existing TypeScript code, I'll definitely use it.

I don't believe it exists, but in theory someone could write a Flutter plugin to evaluate JavaScript on V8 (Android) or JavaScriptCore (iOS).

Re: Announcing Dart 2 Stable and the Dart Web Platform

#76

Earlier quoted context omitted.

Dart is a nice statically typed and compiled C-style language. If you have experience with another such language, it will feel like you already know Dart. The language compliments Flutter well, and the Flutter SDK makes it simple and easy to rapidly build a functional mobile app. Lack of certain features, like reflection, in mobile Dart creates a rift in packages you can utilize in a Flutter app. There are a few wart…

Language with "dynamic" type can't be called "statically typed".

If you have a well-thought out argument, and not a quippy one-liner, I'd earnestly like to hear it.

Dart's developers think otherwise[1]:

> Q. Is Dart a statically typed language?

> Yes, Dart 2 is statically typed. For more information, see Dart’s Type System.

> With its combination of static and runtime checks, Dart has a sound type system, which guarantees that an expression of one type cannot produce a value of another type. No surprises!

> Even with type-safe Dart, you can annotate any variable with dynamic if you need the flexibility of a dynamic language. The dynamic type itself is static, but can contain any type at runtime. Of course, that removes many of the benefits of a type-safe language for that variable.

[1] https://www.dartlang.org/faq#q-is-dart-a-statically-typed-la...

Re: Announcing Dart 2 Stable and the Dart Web Platform

#77
post #8

> 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, but the principle applies to all Dart code. There have been plenty of other improvements happening under the hood, as can be seen in the official changelog. To me it seems kin…

There's always a certain amount of affinity between languages and frameworks. Few languages succeed with a compelling framework or "killer app", and few frameworks succeed without really taking full advantage of the language.

In this case, we've been talking about removing "new" for ages, well before Flutter existed. It honestly never really made much sense in Dart. Flutter wanting it helped tip the scale and get consensus on the team, and now that we have it, it really does benefit all Dart code, even non-Flutter stuff.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#78
post #66

Earlier quoted context omitted.

Pointers are certainly types in Rust, and although it's of course true that the Any trait is not itself a type, a reference to an Any trait (which is what you'd actually pass around) is a type.

Well, you can repeat it many times but it will not become true. I gave you link to the list of Rust types. Pointers are pointers, not types. Traits can have any name, their names mean nothing.

https://doc.rust-lang.org/book/first-edition/raw-pointers.ht...

    *const u32
(for example) is a clearly a Rust type -- a const pointer to an unsigned 32-bit integer, analogous to

    const uint32_t *p
in C/C++.

I'm not sure what you mean about trait names. The purpose of the Any trait is to make it possible to pass around values of any type and dynamically downcast them, as the documentation indicates. That is a safe analogue of casting a void pointer to another type.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#79

Earlier quoted context omitted.

Language with "dynamic" type can't be called "statically typed".

If you have a well-thought out argument, and not a quippy one-liner, I'd earnestly like to hear it. Dart's developers think otherwise[1]: > Q. Is Dart a statically typed language? > Yes, Dart 2 is statically typed. For more information, see Dart’s Type System. > With its combination of static and runtime checks, Dart has a sound type system, which guarantees that an expression of one type cannot produce a value of an…

> With its combination of static and runtime checks

Do you personally use it? That "strong mode" is a theory-only thing, it doesn't work with any real code, only with code you wrote without real third-party libraries.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#80

Earlier quoted context omitted.

Dart is a nice statically typed and compiled C-style language. If you have experience with another such language, it will feel like you already know Dart. The language compliments Flutter well, and the Flutter SDK makes it simple and easy to rapidly build a functional mobile app. Lack of certain features, like reflection, in mobile Dart creates a rift in packages you can utilize in a Flutter app. There are a few wart…

Language with "dynamic" type can't be called "statically typed".

C#, Scala, Kotlin, TypeScript, et. al have a dynamic type. As long as every type isn't dynamic, I think it's reasonable to claim you have static types.
Post reply on HN