Live data from Hacker News

Announcing Dart 2 Stable and the Dart Web Platform

medium.com

81–90 of 259 posts

Re: Announcing Dart 2 Stable and the Dart Web Platform

#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 thing, we're just going to compile to JS like everyone else" but it was too late and nobody cared about Dart anymore and all the excitement and enthusiasm was gone. I think people don't realize just how much excitement and enthusiasm from a potential community makes or breaks a project when it's first announced.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#82
post #49

Earlier quoted context omitted.

Most languages I can think of have this type, from void* to dyn to bounding by the root of the type hierarchy. Not all languages. However, what is c, c++, java, rust, go, if not statically typed? Ambiguously typed? Seems like not a useful distinction to make. I argue static typing is the ability to static type up to 100% of a program, not the exclusion of a dynamic type.

Rust doesn't have such type. And type annotations in Dart are optional - when programmers are not obliged to use them, guess what will happen? They do NOT use them. People are lazy. Dart's types exist only on compilation step. You can try to use "strong mode" in theory, in practice you will never compile it with third-party libraries.

> And type annotations in Dart are optional - when programmers are not obliged to use them, guess what will happen?

The type system will infer a static type based on the type of the initializer.

In some cases, inference may fail to infer a type. Right now, that can silently give you dynamic, but there's a flag to make that an error. I expect before too long that will be the default behavior.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#83

Earlier quoted context omitted.

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.

You are, at best, confusing Dart 2 with Dart 1; strong mode was one of several Dart 1 modes, but, yes, it's possible to run into problems because dependencies weren't designed for it.

There is no option in Dart 2; everything is the equivalent of strong mode, which eliminates ecosystem problems.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#84
post #2

I wouldn't be interested in Dart at all if it wasn't for Flutter. I can't help but wonder if there will be Flutter bindings implemented for other languages sometime.

This seems unlikely because most of the Flutter stack is implemented in Dart, except for the low-level graphics library. It would be more of a fork / rewrite.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#85

I tried 1.x and I regret for wasted time. TypeScript is better for every niche Dart is trying to fill.

I'm sorry Dart didn't work out for you, but I'm glad you found another language that's helping you. We're lucky to live in a time where there are lots of languages to choose from, each with its own strengths.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#86

How's dart as a server ?

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 things like database bindings, logging, etc. The current ecosystem for that on Dart isn't large but I hope we get there eventually.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#87

Earlier quoted context omitted.

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.

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.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#88
post #44
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…

Flutter is probably the last attempt to get some Dart popularity. When Dart came out, Google build it to improve on JavaScript, by replacing it with a whole new language. Microsoft built TypeScript to integrate with JavaScript. I thought, "MS, right? Cobbling together some JS add-on, who will use that? Better get a whole now language that doesn't carry around that baggage from JS :D" I think Dart brought not enough n…

Fabric and reason have a native render target that doesn't involve browsers or wrapping some other UI library?

Re: Announcing Dart 2 Stable and the Dart Web Platform

#89
post #78

Earlier quoted context omitted.

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 analo…

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?

Re: Announcing Dart 2 Stable and the Dart Web Platform

#90
Dart's history of breaking on browser updates because of weird technical decisions really soured me on the idea of ever using it. It's apparently a really good language for native targets, but for the web...

https://github.com/dart-lang/sdk/issues/13285

https://bugzilla.mozilla.org/show_bug.cgi?id=1027011

I can't really blame the language designers, but it's a good example of how if your goal is to cross-compile you have to be very careful about how your language is going to interact with the realities of the platforms it runs on. The idea of my deployed websites or apps breaking every couple browser releases really bums me out. (I've had to deal with it with other cross-compilers too.)

Post reply on HN