Open dasch opened 1 week ago
Languages such as Elm have special syntax that simplifies expressions such as function(x) x.y into just .y; adding support for this shorthand would improve the legibility of Jsonnet code by removing repetitive boilerplate, e.g. this code:
function(x) x.y
.y
std.map(function(city) city.name, std.map(function(country) country.capital, countries))
could instead be written as
std.map(.name, std.map(.capital, countries))
A function that takes a single argument and just looks at a field on it is very common, e.g.
std.filter(.isPublic, files) std.flatMap(.members, groups)
Languages such as Elm have special syntax that simplifies expressions such as
function(x) x.y
into just.y
; adding support for this shorthand would improve the legibility of Jsonnet code by removing repetitive boilerplate, e.g. this code:could instead be written as
A function that takes a single argument and just looks at a field on it is very common, e.g.