Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
cloudfox2 opened this issue Feb 26, 2022 · 0 comments
Open

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

cloudfox2 opened this issue Feb 26, 2022 · 0 comments

Comments

@cloudfox2
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants