Not arguing for them, but can someone explain the negative connotation around macros? I know the modern replacements are constexpr's and a lot of it has to do with lack of type definition, but is there more to it?
I think it has a lot to do with c/++ macros being untyped and unhygienic in general. This makes using them very much error prone and difficult to reason about when something goes wrong.
I think there is too much negative connotation around them though, they can be extremely useful when used properly.
31
u/gracicot Jun 14 '21 edited Jun 14 '21
This is quite amazing what C++ can ship in a library, even though it's not perfect
and uses macros.