Sentinel values =============== Sentinel values are basically a way to combine an enumeration (that is, `only`-values in SLUL) with a reference to an object. There are (at least) two ways to implement sentinel (constant singleton) values: * Per type definition * Per type reference Per type definition ------------------- Example: # Class "File" sentinels Invalid "" None String filename ?Int fd constructor new String filename ?Int fd ... Example of "per reference definition" ------------------------------------- Example: # Class "ErrorKind" only NotFound ConnectionError ResponseError # Class "ExampleClass" func get_value ... return SomeObject (or ErrorKind) file I think "per reference definition" might be better? This could also be extended to allowed for multiple enums: (but this will only work if all but the first are closed enums) SomeObject (or FileErrorKind NetErrorKind) Or specific enum items: SomeObject (or ErrorKind.NotFound) And it could be used to replace option-types/None: (perhaps `?` could be a shorthand for it?) SomeObject (or Optional.None) Limitations ----------- The enum values must not collide with valid pointer vlues on ANY current or future supported platform.