Skip to content

vine: support (mutually) recursive let fns #251

Open
@tjjfvi

Description

@tjjfvi

Currently, let fns are only in scope after the statement, so they cannot be recursive. Instead, it should be that, all let fns in a consecutive sequence of let fn statements are in scope from the first such statement.

For example, in the following code:

/* 1 */ let x = ...;
/* 2 */
/* 3 */ let fn foo(...) { ... }
/* 4 */ let fn bar(...) { ... }
/* 5 */ let fn baz(...) { ... }
/* 6 */
/* 7 */ let y = ...;
/* 8 */
/* 9 */ let fn qux(...) { ... }

foo, bar, and baz would be in scope for lines 3 onward, and qux would be in scope for lines 9 onward.

This would make let fns arguably the most primitive form of control flow in Vine; they correspond nearly 1-to-1 to transfers in the SFG.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions