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

reanme to "guard let" #2

Open
andybezaire opened this issue Aug 22, 2023 · 0 comments
Open

reanme to "guard let" #2

andybezaire opened this issue Aug 22, 2023 · 0 comments

Comments

@andybezaire
Copy link

hi.

It looks like this is an implementation for the swift guard let.

Do you think it is a bit misleading to call it just guard?

guard condition else { return }

The guard statement is an early-exit function.

According to Swift.org:

A guard statement is used to transfer program control out of a scope if one or more conditions aren’t met.

N.B. I was looking for a kotlin version of a guard statement and ended up finding this repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant