Skip to content

Making function calls in rules #23

@antisvin

Description

@antisvin

The problem with making function calls now is that clauses get converted to C-expressions, and we can't really define passing args there. A possible solution would be a new define clause that has function definitions.

For instance, let's consider evaluating code like math.sqrt(foo) > 2:

define:
    foo_root: math.sqrt(foo)
if:
    foo_root > 2
...

Basically, function call results would be added to context for evaluating if conditons, but won't be stored in result context (unless we decide that we need them, but I don't see why we'd do that).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions