Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the biggest challenge is compilation time. With the lack of incremental compilation modifying more complex classes can result in long compilation time. Same is true for modifying templates that are widely used within the code base.

If you look for example at runtime compilation of queries in database systems, compiling can take significant amount of time, at least enough so it doesn't feel instant anymore.

To get incremental compilation, one would need fully dynamic dispatched invocation which would be probably horrible slow.

This said, I'm a strong believer in runtime code generation, just with a reduced scope rather than full c++.



A lot of the complexity of the RCC++ solution over others (I listed those I can find on the wiki https://github.com/RuntimeCompiledCPlusPlus/RuntimeCompiledC...) is about compiling the minimum possible code quickly in a platform independent way. I'd love to see C++ get modules in the spec, along with introspection to make this easier.

Compiling C++ code at runtime is less about end-user code than about improving developer workflow for those who use C++ and want rapid iteration (game developers for example), so avoiding extra languages and VMs is one of the goals.

As for full dynamic dispatch, RCC++ does use virtual functions. I advocate using a 'data oriented approach' so the function table pointer lookup should be amortized by having expensive functions process multiple data items. In practice in my own code I see no detectable overhead.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: