If you need to interface to existing code written in C or other languages (operating system code, for example), you would use PlatformFunction, because it does not require you to write any C code. You can interface to C code using PlatformFunction completely from Smalltalk. PlatformFunction enables you to call arbitrary code that knows nothing about objects.User primitives enable you to write performance-critical code that is Smalltalk-specific. This code is aware of Smalltalk objects. For this reason, these primitives can be very fast, and you can use them to improve performance.
|