During the first quarter, I defined an interface language to use for creating the bindings. I had to create my own for several reasons. Probably the biggest factor was the need to know whether the target language has the right to destroy an object. Most of the target languages has some kind of automatic garbage collection; the programmer never needs to worry about whether to delete an object to free up memory. I didn’t want to force programmers to worry about it when they don’t normally need to. Therefore, I had to be able to mark whether an object was delete-able, so the generated bindings could delete it automatically if necessary.
This is a companion discussion topic for the original entry at https://www.haiku-os.org/blog/jalopeura/2011-06-13_language_bindings_c_api_first_quarter_report_and_second_quarter_goals/