Live data from Hacker News

Dart/Flutter now has macros/metaprogramming

github.com

51–60 of 129 posts

Re: Dart/Flutter now has macros/metaprogramming

#51
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's not fair to compare a web app to a native app.

A flutter desktop app will perform a lot better.

Re: Dart/Flutter now has macros/metaprogramming

#52

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

I have an opposite experience. Making performant JavaScript app require years of learning hacks of web ecosystem. Which is unsurprising, given that web apps build on the foundation layer not suited for performant UI apps. Flutter apps are performant out of the box, because, well, it was designed with this goal in mind.

Re: Dart/Flutter now has macros/metaprogramming

#53
post #47

Earlier quoted context omitted.

> 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

That's clearly not what armchairhacker was claiming.

Re: Dart/Flutter now has macros/metaprogramming

#54

Earlier quoted context omitted.

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

What kind of idiomatic code generation is there in Go?

I mean, they weren't exactly shy about it: https://go.dev/blog/generate

Re: Dart/Flutter now has macros/metaprogramming

#55

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

[deleted]

Re: Dart/Flutter now has macros/metaprogramming

#56

Earlier quoted context omitted.

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

What kind of idiomatic code generation is there in Go?

`go generate` is built right into the language:

https://go.dev/blog/generate

It's quite common to generate code that way.

Re: Dart/Flutter now has macros/metaprogramming

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

> 45% on an intel core on a linux desktop

Just tried it out. 3-5% in debug build. 0% on release build.

Re: Dart/Flutter now has macros/metaprogramming

#58
post #30

Earlier quoted context omitted.

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

> 45% on an intel core on a linux desktop Just tried it out. 3-5% in debug build. 0% on release build.

Let me guess, you did a TextField, not a CupertinoTextField? (It's 20% on release for me, still too much for a blinking cursor). Sure there may be some simple pathological bug in that one widget, but this quality issue in a fundamental widget in the official kit just does not give me the warm fuzzies, especially looking over the the github issue tracker.

And yes I am biased because it is google and they hardly dog food this product.

This particular problem is "fixed" by a simple cursorOpacityAnimates: false (which is apparently how they "fixed" TextField). That still doesn't speak well for QA. This is not really a complaint about a single widget. I really really want to like this stuff, but I have no confidence in it as a serious long term product.

https://github.com/flutter/flutter/pull/104335

Re: Dart/Flutter now has macros/metaprogramming

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

I started some cross-platform work about 6 ago and came into Flutter with plenty of hesitation. I was fearing this much ranted about janky feeling, but so far it has not come. AFAICT from the forums and such, the Web target is definitely far, far behind the mobile targets. This isn’t really a concern for me. For the app I’m building for iOS and Android, the result has been performant, and I’ve really liked the language and framework.

Re: Dart/Flutter now has macros/metaprogramming

#60
I really love the engineering that has been put into dart/flutter and the innovation it has brought to native UI development, but I just can't justify using it for anything. The ecosystem is immature and anything I would use it for could just as easily be written in Kotlin or JavaScript (TS).
Post reply on HN