sinawear

导航

Language binding(语言绑定)

今天,看irrlicht,里面提到了

Language binding

看了维基,翻译了一下。(翻译的自己都拿不定主意,讲什么意思)。

从宏观上理解的语言绑定的意义是:使别的语言也能使用别的稍加修改的库。(不知道,这该如何是实现呀?)

 

http://en.wikipedia.org/wiki/Language_binding

在计算机里,一个绑定从编程语言到库或使用操作系统提供的服务。
In computing, a binding from a programming language to a library or OS service is an API providing that service in the language.

许多软件库是在系统编程语言里编写的,像c或c++。从另外(通常是高层)使用这些库,语言像java,common lisp,python或lua,一个到库的绑定必须重新根据语言的语言代码依赖修改的多少再编译。不过大多数语言提供外部函数接口像python‘s和ecl’s cffi,uffi。
Many software libraries are written in systems programming languages such as C or C++. To use these libraries from another (usually higher-level) language such as Java, Common Lisp, Python or Lua, a binding to the library must be created in that language possibly requiring the recompilation of the language's code depending on the amount of modification necessary; however most languages offer some sort of foreign functions interface like Python's ctypes and ecl's cffi, and uffi.

为了软件的重用,创建库绑定是主要的动机,不需要再用别的语言重新实现库。另外可能的实现确定的算法有效的在高级语言中。
Software reuse is a major motivation for creating library bindings, rather than reimplementing the library in several languages. Another is the impossibility of implementing certain algorithms efficiently in high-level languages.

 

posted on 2012-02-14 00:16  sinawear  阅读(1561)  评论(0编辑  收藏  举报