Closed nikolay closed 5 years ago
@zaphar One of the biggest things in Jsonnet is the lazy evaluation. After having worked with Jsonnet for years, I'd say it's both a curse and a blessing. After I pointed out your project to the lead of Jsonnet, this is what the feedback was:
they're using
self
to meansuper
it doesn't have the laziness or the late binding so it won't be as expressive select could be done with a function in jsonnet I think thisout json foo
thing is also true about bazel you end up with statements that append to the output essentially, rather than expressions that evaluate to the output which is fine, but you can get in a situation where you don't know where your output is coming from (edited) jsonnet also supports all the same output formats as that, except TOML which would be trivial to add if anyone really needed itthe
select
conditionals look handy I don't get why they madeimport
a separate statement (import "foo.ucg" as foo;
) instead of just usinglet foo = import "foo.ucg";
it also seems odd thatout json foo
causes it to write to a file instead of printing json to stdout overall it looks like a fairly reasonable language; seems fairly comparable to jsonnet and nix, aside from lacking real functions
Good feedback, thanks for passing it on.
Self is actually only valid in the context of a tuple so it's not exactly super. I specifically left out the laziness since I wasn't sure it would be of any use.
I have actually been thinking about making import an expression as well so the let foo = import "foo.ucg"
syntax may yet happen.
I was actually not familiar with jsonnet till I saw this question so in that sense no. However it does appear to have similar goals and motivations.