Lach

Results 226 comments of Lach

Необходима проверка возможности декодировать Call Сейчас оно будет паниковать при попытке декодировать enum Call со старой версии чейна, если у нас вдруг поменялось его кодирование/декодирование Как временное решение можно внести...

Падает тест pallet-presence

Deconstruction proposal partially (this/super becomes frozen) solves this issue: https://github.com/google/jsonnet/issues/307 ```jsonnet local sourceObject = { a: 1, b: 2, c:: 3, fieldToOmit: 4, }; local { fieldToOmit: ?, ...targetObject }...

> Then there's the question of avoiding duplicates: > > ``` > { ["a"].["b"]: e, ["a"].["c"]: e } // OK > { ["a"].["b"]: e, ["a"].["b"]: e } // Not OK...

I have experimented with this feature in Rust jsonnet implementation: https://github.com/CertainLach/jrsonnet/releases/tag/v0.5.0-pre2-test Implementation code is here: https://github.com/CertainLach/jrsonnet/blob/gcmodule/crates/jrsonnet-evaluator/src/evaluate/destructure.rs For now i implemented some basic syntax, i.e: Destructuring object ```jsonnet local {a: b}...

Destructuring will also provide general way for features like this: https://github.com/google/jsonnet/issues/865 Not sure about golang/c++ impl, but in Rust i may implement this by making objects iterable (yielding [K, V]...

Latest version of jrsonnet also implements destructuring in function arguments: ```jsonnet local destruct({a}) = a; destruct({a: 1}) == 1 ``` And object destructuring defaults ```jsonnet local { a = b,...

Both backslash and -> syntax is not compatible with default arguments and deconstruction (Which is proposed here: https://github.com/google/jsonnet/issues/307, yet not implemented in neither Golang nor C++ implementations) What about JS-like?...

> Optional parentheses could still be used when necessary I think it should be treated not as optional parentheses, but as optional parenthesis omission JS allows it too in case...

Unfortunately, parameters in jsonnet isn't just a tuple deconstruction They have non-trivial semantics regarding to named arguments (Jsonnet supports pythonic keyword arguments, `(function(a, b, c) null)(1, c = 3, b...