Hacker News new | ask | show | jobs
by touisteur 1844 days ago
Can attest to that. C++ is also OK. You still have to write the 'binding' but the compiler can generate a good part for you. Then you can 'hide' all the C-like things (like 'a pointer is an address', 'an enumerated type is an integer', 'you have to call our free() when you're done'...) behind opaque types, controlled types, etc.

As a simple example you can lookup what the compiler generates as a low-level binding [0] that is wrapped in a higher level API [1].

BTW you can also bind Ada to Java (although support is a bit limited I know places where it's in prod). Don't remember if it's a commercial product or oss.

And for the python people, my company financed a first version of ada-py-bind, inspired by the great pybind11. Still a lot of code to write (or generate) but it works fine.

Thanks onox for those two links!

[0] https://github.com/persan/zeromq-Ada/blob/651ca44cce831c2d71...

[1] https://github.com/persan/zeromq-Ada/blob/651ca44cce831c2d71...