by twic · 1y ago · 0 comments
y = Computed(lambda: calculate_y(x()))
How does this instance of Computed know that it depends on x? Does it parse the bytecode for the lambda? Does it call the lambda and observe which signals get accessed?In my homebrew signal framework, which emerged in the middle of a complicated web dashboard, this would look like:
y = Computed([x], calculate_y)
So the machinery gets to see the signal directly.Too magical for me. I'd rather have something like you described where inputs are explicit, so I don't have to guess about whether the magic will work in any given case.