Sempiler supports OptionSet, a set interface to a bit set.

Symbol Usage Notes
OptionSet OptionSet type definition  

Example

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).

Platform Specific

You can only use OptionSet if it is supported by your target platform (and has been implemented in Sempiler!), eg. Swift.