문제

I see from impnotes 32.3 that clisp has a FFI system. I also see a CFFI project at http://common-lisp.net/project/cffi/.

Can someone knowledgeable please elaborate on any important differences between these two systems? Which is 'better'/'more official'/'recommended'/'more efficient'/'more reliable' etc.?

Many thanks, R.

도움이 되었습니까?

해결책

CLISP FFI is very high-level and, necessarily, CLISP-specific (just like SBCL FFI is SBCL-specific &c).

CFFI is a cross-implementation compatibility layer which is more low-level, and it relies on the underlying implementation's FFI to work.

So, if you are dead set on using a specific implementation, you should be learning its own FFI.

If you want to write code which will run on many different implementations, use CFFI.

PS. Low-level vs high-level means, roughly, that you need to write more characters to achieve the same effect in CFFI than in CLISP FFI; also the result will probably run faster in CLISP FFI.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top