wurstscript / WurstScript

Programming language and toolkit to create Warcraft III Maps
https://wurstlang.org
Apache License 2.0
226 stars 28 forks source link

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

Open cloudfox2 opened 2 years ago

cloudfox2 commented 2 years ago

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