WurstScript icon indicating copy to clipboard operation
WurstScript copied to clipboard

Can we have the safe call sugar to check null simply?

Open cloudfox2 opened this issue 3 years ago • 0 comments

Like foo?.bar() in Kotlin and Swift. It's equal to:

if foo != null
    foo.bar()

And can we have a safe destroy too? I'm writing a lot these code when destory class elements:

if foo != null
    destory foo

cloudfox2 avatar Feb 26 '22 14:02 cloudfox2