You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Ideally you wouldn't use that extension at all because clang silently doesn't emit object files for it, requiring -x c++. But if you think that is important, at the very least it should only be done for actual modules. https://github.com/mathstuf/cxx-modules-sandbox/blob/master/link-use/use.mpp is particularly incorrect because currently main() isn't allowed to be defined inside of a module.
The text was updated successfully, but these errors were encountered:
I'm partial to the "extensions don't matter too much" view because it's all C++ code and the build system can't trust any of it until it scans the code anyways. At that point, we know what kind it is and we can just add whatever flags are necessary to make it be accepted. Sure, assumptions about the code based on the extension are fine, but they shouldn't be pre-destined because of it. If someone really wants to put C++ code into a .js file, I'm not going to question their life choices :) .
I agree with your viewpoint at a high level. How about renaming everything to .cpp? Build systems should be able to handle that.
My issue was with simultaneously introducing a new extension to distinguish modular code from non modular (which I agree is of questionable utility), and also using the modular extension for non modular code. It feels contradictory.
Ideally you wouldn't use that extension at all because clang silently doesn't emit object files for it, requiring
-x c++
. But if you think that is important, at the very least it should only be done for actual modules. https://github.com/mathstuf/cxx-modules-sandbox/blob/master/link-use/use.mpp is particularly incorrect because currentlymain()
isn't allowed to be defined inside of a module.The text was updated successfully, but these errors were encountered: