Last updated at 12:16 pm UTC on 26 June 2005
A primitive method is a Method that invokes behavior in the Virtual Machine or a plugin. Primitive methods provide functionality that is not available from normal Smalltalk methods.
For example, there are primitive methods for I/O For example:
Additionally, there are methods to implement parts of Smalltalk semantics. For example:
- #basicNew creates new objects
- #class returns the class of an object
- #at: and #at:put: access the indexed variables of an array-like object
To implement your own primitive method, see Named Primitives.
FFI defines its own kind of primitive methods and thus provides similar functionality.