Live data from Hacker News

Announcing Dart 2 Stable and the Dart Web Platform

medium.com

111–120 of 259 posts

Re: Announcing Dart 2 Stable and the Dart Web Platform

#111
post #95

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…

Please remember there's a genuine human on the other end, trying to have a respectful conversation with you.

Or there is a person who is trying to prove his offtopic point by some pedantic interruptions, which are far from the main idea of discussion.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#112

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?

https://github.com/google/flutter-desktop-embedding

Re: Announcing Dart 2 Stable and the Dart Web Platform

#113

Anybody using only dart for their mobile apps, how has been your experience with it? Where does it triumph & fail over RN??

Pros: * Flutter is faster. You really notice that for example the animations in flutter are much smoother than in RN * Flutter has really fast development cycle with hot reload ( * Writing UI only once for both iOS and Android * Better documentation * Better tooling support in editors (VSCode and Intellij) Cons: * The Flutter ecosystem is quite small, there are many lacking plugins * The Dart ecosystem is way smaller…

My only complaint so far is some things are not documented very well.

I started leveraging the json_serializable lib and all my responses were returning null... it took me a few days of heavy debugging to figure out it was how I crafted my constructors and how the code generators worked with it.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#114
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…

Well, google itself calls it now 'a client-optimized language' and product manager of Dart is also a product manager of Flutter at the same time, brought in from Microsoft. Tells you everything you need to know where they're aiming - where React (Native) is. The farm is bet on Flutter's success now, it seems.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#115

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

I am willing to bet flutter will be a pretty great success... have you used cordova/ionic/phonegap? (I can't personally speak for react native)

There's a lot of ceremony in those tools, and debugging is clunky because you only debug from the browser, and you need a different browser depending on the phone type.

There are a lot of gaps in every tool, and flutter isn't perfect, but the flutter team has been making some pretty awesome strides to making mobile development enjoyable for once.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#117
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.

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.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#118
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.

Ok, type bound. You can still easily pass around data whose type is not concretely defined at the compilation step. Unless you’re arguing that the dynamic type is actually static, in which case this whole conversation seems semantically pointless.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#119
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.

Dart isn’t statically typed, at least not in the times i’ve used it; it’s gradually typed.

Re: Announcing Dart 2 Stable and the Dart Web Platform

#120
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…

The main negative with Flutter on iOS is that your app ends up looking like an awful Google app instead of something native.
Post reply on HN