Skip to content

Scope of a top-level let declaration #1041

Answered by cueckoo
cueckoo asked this question in General
Discussion options

You must be logged in to vote

Original reply by @seh in cuelang/cue#1041 (comment)

Based on experience with similar constructs in other languages, I find the CUE tool's file-scoped enforcement to make more sense, because let declarations seem like lexical elements to me, intended to be confined as locally as possible, to only where referring expressions can "see" the declaration. Should we tighten the specification's language accordingly?

Replies: 1 comment 5 replies

Comment options

cueckoo
Jul 3, 2021
Collaborator Author

You must be logged in to vote
5 replies
@cueckoo
Comment options

cueckoo Jul 3, 2021
Collaborator Author

@cueckoo
Comment options

cueckoo Jul 3, 2021
Collaborator Author

@cueckoo
Comment options

cueckoo Jul 3, 2021
Collaborator Author

@cueckoo
Comment options

cueckoo Jul 3, 2021
Collaborator Author

@cueckoo
Comment options

cueckoo Jul 3, 2021
Collaborator Author

Answer selected by cueckoo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant