资 源 简 介
TABI is a typeful tagged cross-language calling convention
Shortly speaking, while with cdecl calling convention you pass parameters by position, TABI passes parameters by name and annotates each parameter with its type
It may be used in following situations:
* providing interoperatbility between C, Haskell and any other languages while avoiding complexity of language-specific FFI descriptions. For example, Lua function may receive all parameters as the table
* passing complex datastructures between various languages forth and back, providing faster alternative to serialization approach
* implementing APIs that may be extended without losing compatibility - new services and parameters may not be supported by all client and server implementations but everything will work together
Let"s see some examples. Haskell code:
-- |Client function calling server()client = TABI.call server "service-name" ["i" ==> (1::Int), "s&quo