Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a "pin" operator #9

Open
kredati opened this issue Dec 14, 2023 · 0 comments
Open

Add a "pin" operator #9

kredati opened this issue Dec 14, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request next To do in a minute proposal A proposal to change the language semantics Language behaviour syntax Syntactic forms

Comments

@kredati
Copy link
Contributor

kredati commented Dec 14, 2023

à la Elixir: use a bound name in a pattern as a value, e.g.

let x = 42
let *x = 42 &=> ok
let *x = 23 &=> panic!, no match

*x is evaluated in the patterns above.

(Elixir uses ^ instead of *, but * is cooler.

@kredati kredati self-assigned this Dec 15, 2023
@kredati kredati added enhancement New feature or request syntax Syntactic forms semantics Language behaviour proposal A proposal to change the language next To do in a minute labels Dec 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request next To do in a minute proposal A proposal to change the language semantics Language behaviour syntax Syntactic forms
Projects
None yet
Development

No branches or pull requests

1 participant