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.
Announcing Dart 2 Stable and the Dart Web Platform
111–120 of 259 posts
Re: Announcing Dart 2 Stable and the Dart Web Platform
#112Flutter 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?
Re: Announcing Dart 2 Stable and the Dart Web Platform
#113Anybody 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…
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
#114Reading 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…
Re: Announcing Dart 2 Stable and the Dart Web Platform
#115Flutter is going to make/break Dart. If flutter takes off, Dart is saved. Otherwise, looks bleak.
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
#116Re: Announcing Dart 2 Stable and the Dart Web Platform
#117Earlier 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.
Re: Announcing Dart 2 Stable and the Dart Web Platform
#118Earlier 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.
Re: Announcing Dart 2 Stable and the Dart Web Platform
#119Earlier 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.
Re: Announcing Dart 2 Stable and the Dart Web Platform
#120Flutter 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…