![]() |
Smalltalk/X WebserverDocumentation of class 'InlineObjectClassDescription': |
|
Class: InlineObjectClassDescriptionInheritance:Object | +--Behavior | +--ClassDescription | +--InlineObjectClassDescription
Description:inline objects are an experimental feature in ST/X (and currently not used by the system). The are created by the parsers/compilers with the following syntax: #{ <slotName>: value . ... } i.e. similar to the brace-array construct { expr1 . ... } For every inline object, an anonymous class is created, providing getters and setters for the slots. (if literal objects are immutable (which is the default), no setters are generated) You cannot add any semantic (i.e. methods) to inline objects - they are only useful as containers with a nicer protocol as compared to dictionaries or arrays. All such created classes will be subclasses of me. [example:] |foo| foo := #{ foo: 'foo value' . bar: 'bar value' . baz: 'and obviously: a baz value' }. foo bar. foo baz. foo inspect. Instance protocol:queries
|
|
ST/X 7.1.0.0; WebServer 1.663 at exept.de:8081; Mon, 04 Aug 2025 14:20:50 GMT
|