Replies: 2 comments
|
Was planning on doing this first through native library hooks. dlopen, dlsym, dlclose etc hooks. Its a ways off though. Then later theoretically you could write C/C++ code in your clj itself and it would compile it to a .so file and use the above methods to automatically hook into it. This is all in theory of course. |
0 replies
|
Something like (native/c++ Is possible, but I'd have to build a C++ parser into the program, which I really don't want to do. Putting the code inside a string is icky too because what if you need a string inside that string, then your escaping all over and f' that. You could do something like C++ Raw strings, which is probably the more reasonable approach. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
One of Clojure's main benefits include being able to interop with the native underlying environment that it's running on: Clojure interops with the JVM, Clojure CLR with .NET, ClojureScript with JavaScript and so on.
It would be very interesting to be able to interop with C++.
Jank has C++ interop that looks like this:
You can read more about it here.
All reactions