Skip to content

Version 0.2.5

Compare
Choose a tag to compare
@jjv360 jjv360 released this 26 Dec 22:20
· 19 commits to master since this release

Added support for singletons, which are the same as normal classes but have a shared() accessor. Usage:

# Create a singleton class
singleton MySingleton:
    var v1 = 7
    method init() = echo "Singleton accessed for the first time!"

# Access the class, which also triggers init() the first time only
echo MySingleton.shared.v1