Live data from Hacker News

Dart/Flutter now has macros/metaprogramming

github.com

41–50 of 129 posts

Re: Dart/Flutter now has macros/metaprogramming

#41
post #30

Earlier quoted context omitted.

>Why would I use it over something like Rust, Go, or even JavaScript? Honestly, mainly for flutter. But if you do chose flutter for your project, you will suddenly wish everyone was using dart for everything else instead of Java on android, or c#/Swift on ios ect. if that makes sense. If sound type checking is truly feasible on the web then I'd say dart should be there too. But I can't say if that's really the case.…

> Java on android You mean Kotlin? Nah. Dart is ok. It doesn't perform as well as those peer languages. It's nice its FFI story is good, but the ecosystem is very weak even compared to Javascript. As for the tooling. It's decent. I wouldn't call it amazing, unless you come from systems that were anemic to begin with, then it seems pretty amazing. As for flutter. I recently installed it again. A test app with a single…

CADT?

Re: Dart/Flutter now has macros/metaprogramming

#42
isn't this bad? every single language I have ever seen that added macros (including Rust) has had problems with macros. unless you are VERY careful, the macro language ends up being turing complete, and/or compile times explode. also now you have two programming languages, and macro heavy code tends to be unreadable, which is fine for the API users, but makes maintenance a nightmare.

Re: Dart/Flutter now has macros/metaprogramming

#44
Flutter is like Qt where they implement their own windows themselves. But instead of C++ and OpenGL, they use ... Dart and CSS? All the ease-of-use and ergonomics of C++, and the raw bare metal performance of Python. /s

I try to give it the benefit of the doubt, so I found a demo site. Here is the first example I opened: https://flutter.github.io/samples/web/material_3_demo/

I click play on the progress indicator. My CPU usage goes up 5%. This is on a Ryzen 9 7950X3D. Compare to Unreal Tournament 2004 at max settings running at 240fps, which uses 6% cpu.

I just can't take Flutter seriously. I don't care how good the developer experience might be. It's absolutely terrible for the user.

Re: Dart/Flutter now has macros/metaprogramming

#45
post #30

Earlier quoted context omitted.

>Why would I use it over something like Rust, Go, or even JavaScript? Honestly, mainly for flutter. But if you do chose flutter for your project, you will suddenly wish everyone was using dart for everything else instead of Java on android, or c#/Swift on ios ect. if that makes sense. If sound type checking is truly feasible on the web then I'd say dart should be there too. But I can't say if that's really the case.…

> Java on android You mean Kotlin? Nah. Dart is ok. It doesn't perform as well as those peer languages. It's nice its FFI story is good, but the ecosystem is very weak even compared to Javascript. As for the tooling. It's decent. I wouldn't call it amazing, unless you come from systems that were anemic to begin with, then it seems pretty amazing. As for flutter. I recently installed it again. A test app with a single…

The dart ecosystem is way richer than I expected it to be. So far I've found good options for everything I need and in more than a few cases the libraries are better designed than the JS equivalents.

I can't speak to Linux desktop performance but on the Mac my Flutter app sips CPU and memory.

Google abandoning it is a real risk. If they continue to support it I think Flutter has a great future.

Re: Dart/Flutter now has macros/metaprogramming

#46
post #44

Flutter is like Qt where they implement their own windows themselves. But instead of C++ and OpenGL, they use ... Dart and CSS? All the ease-of-use and ergonomics of C++, and the raw bare metal performance of Python. /s I try to give it the benefit of the doubt, so I found a demo site. Here is the first example I opened: https://flutter.github.io/samples/web/material_3_demo/ I click play on the progress indicator. My…

It can use css on the web but in general it uses skia directly which is C++ and OpenGL (or Metal or whatever).

Re: Dart/Flutter now has macros/metaprogramming

#47

I hope Dart gets more support, I really want alternatives to TypeScript for developing webapps which aren't super "bulky" (slow startup, buggy and hard to debug) and support mobile apps. Dart seems to be the best at both although I haven't used it much. It also seems reasonable (one of the reasons I don't like TypeScript is because it still has some quirks from JavaScript like `===`, also because the types are occasi…

> webapps which aren't super "bulky" (slow startup, buggy and hard to debug) All good things. Hot take to think Dart is superior in that respect.

As hot of a take is that macros and meta programming are going to make startup and code bloat better

Re: Dart/Flutter now has macros/metaprogramming

#48

I hope Dart gets more support, I really want alternatives to TypeScript for developing webapps which aren't super "bulky" (slow startup, buggy and hard to debug) and support mobile apps. Dart seems to be the best at both although I haven't used it much. It also seems reasonable (one of the reasons I don't like TypeScript is because it still has some quirks from JavaScript like `===`, also because the types are occasi…

Isn't flutter the anti thesis of that? Making performant JavaScript apps is much much easier than making a performant flutter or especially flutter web app

Re: Dart/Flutter now has macros/metaprogramming

#49

I hope Dart gets more support, I really want alternatives to TypeScript for developing webapps which aren't super "bulky" (slow startup, buggy and hard to debug) and support mobile apps. Dart seems to be the best at both although I haven't used it much. It also seems reasonable (one of the reasons I don't like TypeScript is because it still has some quirks from JavaScript like `===`, also because the types are occasi…

Isn't flutter the anti thesis of that? Making performant JavaScript apps is much much easier than making a performant flutter or especially flutter web app

You can use dart without flutter.

Re: Dart/Flutter now has macros/metaprogramming

#50

After years of working in Typescript I've been doing a Dart project for the last 6 months or so. Overall it's a great language but one of the clunky aspects is the use of code generation for so many things. If this can reduce or even eliminate that it will be a big step forward for devX.

That's a Google-ism for sure. (Go, Dart/Flutter, Angular, Bazel)

What kind of idiomatic code generation is there in Go?
Post reply on HN