开发者

Which Smalltalk flavors support writing C code in a method?

开发者 https://www.devze.com 2023-03-23 21:47 出处:网络
I\'ve heard that in Smalltalk/X and possibly other flavors you can include C code insi开发者_运维问答de a method, is this possible with other Smalltalk implementations? which ones?Smalltalk/X is the o

I've heard that in Smalltalk/X and possibly other flavors you can include C code insi开发者_运维问答de a method, is this possible with other Smalltalk implementations? which ones?


Smalltalk/X is the only Smalltalk I am aware of that supports writing C code directly within Smalltalk methods. Of course, most other Smalltalks (Pharo, VisualWorks, GemStone, ...) allow you to write and use primitive methods written in C, but this is rather cumbersome and requires one to use an external C compiler.

An interesting alternative could be NativeBoost, a library to dynamically generate and run machine code from within Pharo.

0

精彩评论

暂无评论...
验证码 换一张
取 消