-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easier FFI #24
Comments
Luke Hi, Ferret has no concept of reflection. That's the show stopper for doing things like,
I try to embrace C++ as much as possible but Ferret targets embedded systems and it needs to compile with |
@LukeFernandes one possibility to avoid writing tedious glue code is to write macros. You could write a wrapper macro to convert OpenGL calls at compile time. |
FWIW, I've had success with generating JNA calls from CastXML [1] output in Clojure. |
Thanks for Ferret it’s awesome.
The current FFI is non ideal when large C libraries are required. I want to use OpenGL with Ferret. The only solution now AFAIK is to write tedious glue code for every single OpenGL method (and there are loads of little ones).
Compare with Clojure where Java libraries can be consumed trivially e.g. (.glDoSomething 567).
Since Ferret is a new language, why can’t it be designed to lean into the host? Like Clojure leans into the JVM. Why can’t we just use C routines natively, calling them as if they were Lisp functions? If they return pointers or whatever, then why can’t we use the native Ferret C++ pointer type to store them? (EDIT - I’m aware that Ferret has a pointer type. What I would hope for is that it could be created and used easily without inline strings)
The text was updated successfully, but these errors were encountered: