Skip to main content
🚨 重要提示

本项目目前仍处于早期开发阶段,核心功能尚未完全实现,语法规范和工具链仍在持续完善中。

None Type

🐳Type Overview​

The none type is also an object.

TypeDescription
noneThe none type
Note

Collie's none type differs somewhat from other languages: null is a special object that also has its own properties.

🏅Base Methods​

MethodResultDescription
null.toString()"null"Converts the object to a string
null.valueEquals(object? anotherNull)true
null.referenceEquals(object? anotherNull)true

🏅Syntax Examples​

  • Define a none value:
none nullObject = null; // All objects of the none type are null (equal by both reference and value), so this can also be written simply as: none nullObject;

if (nullObject.isNull()) { // or: if (nullObject == null) {
print("Life is but an empty dream");
}