Ultimately, this isn't something Cling needs to worry about. You can have your cake and eat it, too. If that sounds too good to be true, know that it's how Clojure devs write all programs. We spin up the process and then send code to it from our editors, without needing to tear it down.
jank gives you this, in C++ land, including support for inline C++ within your Clojure code. I'll have a lot more demos coming out this year, but you can also check out the jank blog or my talks at ROOT's compiler research group and Clojure Conj 2023.
The problem is that too many people insist in using it like C.
Is as if one changes the JavaScript file extension to Typescript, and then keeps writing JavaScript ES3 on it.
>you can basically use inline C++ in python REPLs
That's exactly what I was getting at. There's no need for a pure C++ interactive environment. Just use python at this point.
And if that's in a familiar language, then even better. Clojure is a good choice, but I am still learning it.
Note: I am a lone programmer building Quant Engineering subsystems for personal purposes. So evaluate (pun intended :D) my opinion in that context.
How so? My experience is exactly the opposite.
Still, there are rough edges,
1. Rough: No (ergonomic) expression-evaluation available at the moment, hopefully tree-sitter based tools will solve this in the future.
2. Rougher: In the general case, I can't redefine a function/class. The 'global' namespace can be used to 'some extent' to achieve 'deterministic redefinition', but the code strays away from idiomatic Python.
3. Roughest: I have found Python performance to always be a concern. Maybe I am biased towards C/C++/Rust for performance purposes, aka Optimal Resource Utilization.