inkle / inkle/ink

Short-circuit Logical AND expressions

Open
#816 2 comments 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
4.9k
Forks
540
PR merge metrics
No merged PRs in 30d

Description

I have an Ink function of the form:

```
=== function can_do_something()
~ return some_var == 0 && some_expensive_to_run_external_function() == true
```

`some_expensive_to_run_external_function` gets called every time, even when `some_var == 0`

Ideally, for performance, Ink would follow other languages where typical behavior is:

> && guarantees left-to-right evaluation: the second operand is not evaluated if the first operand is false.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.