Skip to content

Navigation Menu

Sign in
Sign up

feat: Fast return conditions #88

Open
Open
Assignees

Description

Allow for a faster way of writing conditions for ret statements.

For example:

func main() s32 {
 var s32 myInt = ...;
 ret myInt [x -> x > 64]
}

This will return myInt only if the condition defined on the label x is true. If the condition fails, the function will continue as normal. Additionally, the binding name can be skipped as it is x by default:

func main() s32 {
 var s32 myInt = ...;
 ret myInt [x > 64]
}

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

  • Status
    Todo Later

Milestone

No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    AltStyle によって変換されたページ (->オリジナル) /