Skip to content

Modern Optional None

Paul Squires edited this page Oct 19, 2026 · 5 revisions

Home › Optional › Optional › None

None

Returns an empty Optional of the type you write out.

Syntax

None( of T )

Examples

#import "std/outcome"
using outcome

dim o as Optional( of integer ) = None( of integer )( )

print o.HasValue( )          '' false

'' The type argument must be written: there is no parameter to infer
'' from. A default-constructed Optional is already empty, so this is for
'' saying "absent" out loud, typically in a return.
dim d as Optional( of integer )
print d.HasValue( )          '' false

Library: Optional
Category: Optional
Documented under: Members

Clone this wiki locally