Skip to content

feat: Fast return conditions #88

@Zffu

Description

@Zffu

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]
}

Metadata

Metadata

Assignees

Projects

Status

Todo this release

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions