Skip to content

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

Open
@cloudfox2

Description

@cloudfox2

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions