Bonding programming languages together


Using the correct tool for each job is common advice, but it’s difficult to implement when tools needto talk with each other. When programming languages are involved, we often resort to implementing custom protocols or RPC interfaces. Having to use a library available only in a foreign language is an especially common scenario.We introduce Bond, a simple serial protocol based on JSON which can be used to stitch different interactive programming languages with zero interfaces.Bond lets you call functions in other languages as they were regular functions in the host language. It also allows remote functions to call back local functions as if they were native, making the inter-language barrier almost invisible.Bond can be used to extend an existing program in a different source language, to isolate an execution context in a different process for security purposes or to perform calculations on a remotehost in a completely transparent way. bond is currently available for Python, PHP, Perl and JavaScript (Node.js).