OptionSet, a set interface to a bit set.
||OptionSet type definition|
Consider this example in TypeScript, a language whereby it is commonplace to represent bit sets (or ‘masks’, ‘flags’ etc) using the bitwise OR operator
Thus, the syntax for
OptionSet in TypeScript is the same (in order to maintain a feeling of familiarity with the source language).
- NOTE The syntax for
OptionSetdepends on how bit sets are represented generally in your source language
- NOTE The name for this feature comes from Swift and may be renamed in future to be agnostic
You can only use
OptionSet if it is supported by your target platform (and has been implemented in Sempiler!), eg. Swift.