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

concept: on let clauses and declarations #188

Open
myitcv opened this issue Oct 29, 2024 · 2 comments
Open

concept: on let clauses and declarations #188

myitcv opened this issue Oct 29, 2024 · 2 comments
Labels
concept guide For content that in the "explanation" diataxis quadrant content idea Idea for a new piece of content

Comments

@myitcv
Copy link
Member

myitcv commented Oct 29, 2024

A concept piece explaining the disintction between let clauses and declarations. Based on cue-lang/cue#3537.

Copying the example from there for ease of reference:

exec cue eval x.cue
-- x.cue --
working1: {
	let x = 5
	if 5 > 3
	let y = 5 {
		p: [x, y]
	}
}

broken2: [
	let x = 5
	if 5 > 3
	let y = 5 {
		p: [x, y]
	}
]

working2: [
	if 5 > 3
	let x = 5
	let y = 5 {
		p: [x, y]
	}
]
@myitcv myitcv added content idea Idea for a new piece of content concept guide For content that in the "explanation" diataxis quadrant labels Oct 29, 2024
@extemporalgenome
Copy link

working1 and broken2 seem identical.

@myitcv
Copy link
Member Author

myitcv commented Oct 31, 2024

working1 and broken2 seem identical.

broken2 is a list value, working1 is a struct.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concept guide For content that in the "explanation" diataxis quadrant content idea Idea for a new piece of content
Projects
Status: Backlog
Development

No branches or pull requests

2 participants