Replies: 7 comments 2 replies
|
Hi Greg @g5t , I think the behaviour you mention dates from when I pushed the COPY stuff. Indeed, seen from today's perspective,it would probably make sense to either not copy, or at least explicitly print-out what is actually copied, so that there is no surprise. So, basically when do we actually COPY ?
and for each, what do we expect in terms of grammar ? |
|
To me personally, my thinking of the current practical use of
To me "keeping usage simple" means copying |
|
@g5t could you add another voting option for "Keep McCode implementation as is, but add a warning when overwriting an EXTEND block" ? |
|
I don't know how the vote works, but I choose "keep as it is today, and add warnings when over-writing". |
|
I voted, but ultimately I don't have a strong opinion :-) |
|
Adding a warning is the unanimous decision. @willend did you have an idea how to do that? |
|
I've put together #1786 which does this for the explicitly discussed COPY + EXTEND scenario. The question is then if we want something similar or different for other things like |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
The 'McCode' grammar includes the possibility to define a component instance from another component instance defined earlier in the
Instrfile; e.g., from theILL_H22_VIVALDIexample instrumentThe resulting
Environment_outcomponent instance has all of the same parameter values asEnvironment_inwith the exception ofconcentricwhich is updated to be0.Depending on how closely you've looked at
instrument.y, you may or may not be surprised to learn that theEXTENDcode block ofEnvironment_outisnot
(like I erroneously believed).
The current question is not so-much about whether the current behavior is 'right' in this case, but rather in the case where
Environment_outdoes not define anEXTENDblock of its own. In such a case, you might expect the instance to have no extend statement but in the current implementation it has the same extend block asEnvironment_in.The current implementation in fact sets all of the following to the same reference
EXTENDGROUPJUMPWHENMETADATAwhen
COPYis used, which might be surprising to some users.@willend @farhi @mads-bertelsen:
Is this the generally understood and preferred behavior for the
COPYverb?3 votes ·
All reactions