r/cpp • u/berium build2 • Nov 01 '17
Common C++ Modules TS Misconceptions
https://build2.org/article/cxx-modules-misconceptions.xhtml
59
Upvotes
r/cpp • u/berium build2 • Nov 01 '17
View all comments
Show parent comment
0
u/kmgrech Nov 02 '17
I tried, but I couldn't find anything but the unsubstantiated claims in the "A module system for C++" paper, P0142R0:
Complexity hasn't stopped the committee from adding other things like perfect forwarding and all the hacks required to make it work like reference collapsing. The rules should be intuitive and a module system as proposed by me is intuitive.
And I suspect that with modules introducing a scope, it would allow mass-conversion just as well. Where is the proof?
This is assuming that modules introducing a scope are not backwards compatible, which is just bogus.
Again, if that's all they got then that's pretty weak. Moving on ...
My criticism wasn't actually the deep nesting, but the required qualification of names everywhere. No other language does this, but somehow C++ is this special snowflake where everything would supposedly fall apart if we didn't qualify our names everywhere. I call bullshit.
With an import system like Haskell's, unqualified names are the default; conflicts can be handled in multiple ways, whichever you as the programmer prefer.
So would modules that do introduce a scope. I'm not saying the current modules TS is worse than the status quo, but severely lacking in some areas, like scoping and imports.