4 ms·
I think this could be more interesting if it was a superset of C++ that allowed for brevity in some cases. Something that could: 1. Act as a preprocessing step
by yitosda 8y ago
I think this could be more interesting if it was a superset of C++ that allowed for brevity in some cases. Something that could:
1. Act as a preprocessing step for any existing C++ file
2. Output perfectly servicable C++ in the case where you want to move away.
Additions like the "known" keyword make this look badly thought out.
In any case, the weakness of C++ in most cases is compilation speed, not typing speed. Even in the ideal case I can't see this adding more value than it detracts (preprocessing speed + buildsystem complication + extra dependency).
- jakear 8y agoOne nice feature is writing your class interface/implementation all as one and the system splitting it into .h .and .cpp. Especially if it can be set to do things like the "pimpl" pattern. I'm probably a minority in the C++ world, partially because I don't have a powerful IDE, but I tend to write everything in .h and only split it out later on, which gets annoying.
- ChrisSD 8y agoC++ is (hopefully) getting a proper modules system. So this should eventually be a problem of the past.
- jjuhl 8y agoThe work required to split things into .h and .cpp files is trivial and only needs to be done once. There's no need for a tool to simplify this 30sec step.
- stochastic_monk 8y agoI write template-heavy code, so most ends up being in headers anyhow.
- gmueckl 8y agoIf compiler times and ordering of declarations were easier to handle, I would probably change my code to live in headers only. Keeping headers and sources in sync is annoying. And the compiler also gets amazing optimization opportunities if it can see all of the implementation code.
- jjuhl 8y agoAs far as optimizations go, LTO (Link Time Optimization) solves a large part of that problem
- vrsperanza 8y agoSimply disabling variable implication actually fixes that and removes the need for the "known" keyword. Doing that would turn CPY into a valid preprocessing step for any existing C++ file. I'm currently working on a way enable or disable certain functionalities according to your preference. It is in fact able to output perfectly servicable C++ code by simply using a flag (-ex) CPY also helps with the compilation speed problem by doing a makefile-like compilation, were it only recompiles edited parts of the code. It can also be used upon complete c++ projects and it would only actually execute the compilation step.
- vrsperanza 8y agoJust added a compilation flag to completely disable variable implication, this removes the need to ever use the "known" keyword