Optionals (T?)
Optional or nullable values can be declared either by using the questionmark operator (?), or by adding an undefined variant:
- TypeScript
 - Swift
 - Kotlin
 - C++
 
interface Math extends HybridObject {
  a?: number
  b: number | undefined
}
class HybridMath: HybridMathSpec {
  var a: Double?
  var b: Double?
}
class HybridMath: HybridMathSpec() {
  override var a: Double?
  override var b: Double?
}
class HybridMath: public HybridMathSpec {
  std::optional<double> a;
  std::optional<double> b;
};
In Kotlin/Java, nullables have to be boxed in object types.