There are many ways to develop plugins which provide interfaces for other languages. Some are good, some are bad, and then there are monstrosities like irssi-perl that can only be described as Cthulhu in code form. This is a list of things to keep in mind when developing language interfaces.
- Do not just wrap the origin language’s plugin API. This is particularly harmful when the target language is object-oriented and the origin language isn’t.
- Most importantly, developers shouldn’t have to program like they’re using C when they aren’t.
- This means transparently converting between your types and the target language’s native types, just in case this wasn’t obvious.
- Do not ever allow the target language to see pointers, in any form, unless that language uses them.
- [to be continued]