-
Notifications
You must be signed in to change notification settings - Fork 227
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
Prevent changing meaning of std in desugared expressions #69
Comments
This is also a bug in the C++ version I think? |
Short answer is "yes":
|
Also removes intrinsic interface for natives, they weren't useable for users anyway, and we have native callback support now. Fixes google/jsonnet#378 Fixes google/go-jsonnet#69 Signed-off-by: Yaroslav Bolyukin <iam@lach.pw>
shouldn't std be just a reserved keyword which can not be used to create a local? |
In jrsonnet, I have fixed this by not desugaring and instead implementing the comparison/mod (formatting) operator directly. In sjsonnet they have implemented the same approach. (This caused some problems: in jrsonnet, stdlib is not special, but the separate library, same as any user can write when using jrsonnet as a library, so formatting/comparison are implemented in core language, and not in the stdlib. I don't think this applies to cpp-jsonnet/go-jsonnet, though.) |
Some constructs are desugared to functions from std. The problem is that if the user wraps them in their own definition of std they can change the meaning of core language constructs (probably just break them) which will be extremely confusing.
We can have special alias for std, unavailable for the user, for example
$td
.The text was updated successfully, but these errors were encountered: