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.
精彩评论