casey / casey/just

Stabilize user-defined functions

Open
#3,248 9 comments 8 reactions 0 assignees View on GitHub
stabilization
Dominant language
Rust
Stars
35.8k
Forks
846
Avg merge
27m
Merged PRs (30d)
3

Description

User-defined functions were added in #3247 with the following syntax:

```just
foo(a, b) := a + b
```

They are currently unstable, since I'm not sure about the syntax. The alternative that I'm considering is:

```just
fn foo(a, b) := a + b
```

I personally think the syntax without `fn` looks better, but with `fn` allows grepping for function definitions with `^fn`, however I'm not sure if that's a huge advantage.

Feedback on the syntax is most appreciated, in either direction. I'd like to stabilize user-defined functions soon, since it's only the syntax which is holding them back.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.