apple / apple/pkl

Provide a shorthand for writing out multiple `let` statements

Open
#1,116 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
11.5k
Forks
402
Avg merge
1d 15h
Merged PRs (30d)
20

Description

At the moment you can write multiple `let` statements as follows:

```pkl
let (foo = 10)
let (bar = 42)
foo + bar
```

Provide a shorthand for writing out multiple `let` statements:

```pkl
let (foo = 10,
bar = 42)
foo + bar
```

This is a suggestion for notation. The main thing would be to reduce the number of `let` expressions required to define a bunch of values.

Contributor guide

Open the contributing guide

Research direction

The issue names no files, tests, or entry points. Start by locating the parser and tests for `let` expressions, then determine how comma-separated bindings should be parsed and validated. Done means the proposed shorthand is supported while the existing multiple-`let` form continues to work.

Written by the indexing model from the issue text.

Assessment

Domain
compilers
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.