vx-lang / vx-lang/Vx

lang: `if let` and the `?` operator

Open
#535 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core-lang devex enhancement
Dominant language
Rust
Stars
14
Forks
2
Avg merge
12h 42m
Merged PRs (30d)
61

Description

Neither exists. if let Some(v) = opt { .. } does not parse, and ? is only consumed as a dynamic tensor extent in Tensor<f32, [?, ?]>.

What needs it. Nothing, strictly. Both are sugar: if let is a two-arm match, and ? is a match on Result that returns the error arm. They are here because core is thousands of lines of exactly those two shapes, and writing them all out makes the library harder to read than the Rust it is being checked against.

Shape of the work. Both desugar in the parser, so neither should reach the checker or either code generator as a new form.

The other two items in this group already have issues: visibility is #489 and the missing while loop is #506.

Part of the core library plan (#451), item A20. Not a blocker for any phase.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the parser and its existing handling of match expressions and dynamic tensor extents. Implement both forms as parser desugarings so they do not reach the checker or either code generator as new forms. Done means the documented if let and ? examples parse and follow the stated match-based behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.