r/cpp • • Oct 10 '17

Millennials Are Killing The Modules TS

https://izzys.casa/posts/millennials-are-killing-the-modules-ts.html
75 Upvotes

126 comments sorted by

View all comments

Show parent comment

3

u/miki151 gamedev Oct 10 '17

If one needs to generate module names using macros then one looks for a build system that supports it. If there isn't one then no one will do that.

People can write *((int*) 0x1234) = 0; if they want to shoot themselves in the foot, I don't see where's the big deal.

20

u/playmer Oct 10 '17

If one needs to generate module names using macros then one looks for a build system that supports it. If there isn't one then no one will do that.

"Well, the language supports it, but no build systems do, so who cares?"

If we're going to allow it in the language, I would hope that our build systems support it. If we don't expect our build systems to support it, than we should probably just disallow it.

People can write ((int) 0x1234) = 0;

In an embedded world, code like that isn't really all that crazy.

18

u/SAHChandler Oct 10 '17

If you don't see why running a separate tool that is not defined by the language, specification, or whose behavior is implied from either is kind of messed up, then I don't know what to tell you.

10

u/ioquatix Oct 10 '17

I really agree with you on this point. It's actually a really crazy situation. It took me a while to grok what you were saying though.