Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


> A macro declaration is a user-defined Dart class that implements one or more new built-in macro interfaces. Macros in Dart are written in normal imperative Dart code. There is not a separate "macro language".


Have you seen Zig's comptime macros? On the surface, that seems like a great approach: no second language and readability fails




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: