Closed gregsn closed 3 years ago
We decided to allow this way of expression and adjust the target code so that it aligns with what you see: the field gets written on the fly. You might get a warning in records. But disallowing feels too rigorous.
Will close this proposal. DECLINED
19 surfaced a readability issue
in short this is the problem:
I propose to not allow this kind of expression. You still can use the pad like this though:
What you can't do is to create a patch that suggests something else than the compiler actually makes out of it.
To be discussed: Disallowing through-pads (on a particular moment) can result in troubles when refactoring. Maybe we should put a warning onto that pad?
Edit: See also: https://discourse.vvvv.org/t/this-pin/18127 The suggested solution in that post was: just write at the right moment. The problem with this approach is that when switching to Record you get an entirely different behavior (we can't write into the old snapshot (since it shall be immutable), and we're not yet ready to build a new snapshot (we're in the middle of executing the patch). So we'd probably need to postpone writing to the field, which would make this "just write in the right moment"-solution only work on classes.)