3 ms·
C macros are not hygienic, which is one motivation for C++ templates. I agree with what you're saying about the pre-processor being part of the standard but it'
by solidsnack9000 10y ago
C macros are not hygienic, which is one motivation for C++ templates. I agree with what you're saying about the pre-processor being part of the standard but it's really hard to write those things in a way that is safe.
There were many motivations for C++ -- and many more seemed to get added as it went along -- it's not just generics parametric polymorphism. Of course I would hate to say: Go should have every language feature or else we'll end up with Go++ or Objective-Go or something like that. But simplicity is not just a matter of not providing for something.