Programmer Reference : VAST Virtual Machine API : Who should read this chapter
Who should read this chapter
This chapter is for developers needing to interface to other languages or write custom primitive operations.
Some reasons to interface to other languages are:
Low-level operating system interface requirements
Performance-critical code or enhancements
Preserving existing business-critical code
You can use either of two mechanisms for interfacing to C code:
PlatformFunction
User primitives
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.
This chapter assumes a familiarity with the C programming language and with the C compiler for the VA Smalltalk platform.
Last modified date: 01/29/2015