Overused as external API or just in general? I've found them pretty useful for bits of my crates, but I don't think I've exposed any in a public API.
-
-
-
I don’t even use them internally. I find them too obfuscating :)
- 1 more reply
New conversation -
-
-
Unpopular mitigation: everywhere someone would use a macro to abstract over syntax, it should be obviated by introducing or generalising language features to let them abstract over semantics instead (e.g. higher-kinded types, higher-rank polymorphism, first-class patterns…)
-
That’s how I ended up at dependent types! Still need to patch up some stuff with elaborator reflection though :/
- 1 more reply
New conversation -
-
-
If everyone is using macros, it might be evidence that the type system is not sophisticated enough. It could also be that not everybody understands what idiomatic Rust should be, so they exploit macros to try to make the language closer to what's in their head.
- End of conversation
New conversation -
-
-
Popular opinion: Sometimes the type system keeps us from reusing the same code (because we cannot get the types to match). This leaves us with macros, code generation or copy & paste. The latter carries its risk, so the former are sometimes valuable.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Every time I use a macro I feel bad and want to find a way to replace it with anything but a macro. The only exception is if it’s a macro that thunks arguments to a std macro
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Yeah I mostly stay away as well unless a macro actually has a substantial gain
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
Same problem in Scala.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.