feldob / InPUT

A descriptive and programming language independent format and API for the simplified configuration, documentation, and design of computer experiments.
7 stars 25 forks source link

scoping #23

Open feldob opened 11 years ago

feldob commented 11 years ago

Received question:

"I just have a short question. When I have a parameter X, and I have a structured parameter Point that has an inner parameter X ("Point.X"), then constructor="X" will use the outer rather than the inner X, and the initialization will not be consistent. Is this kind of scoping intentional?"

This is not intentional, scoping should be inside out.

finkn commented 11 years ago

This is probably where you want to look for more details on that: https://github.com/finkn/InPUT/blob/master/Java/src/DocTest/src/se/miun/itm/input/model/design/ParameterShadowingTest.java And possibly here: https://github.com/finkn/InPUT/blob/master/Java/src/DocTest/src/se/miun/itm/input/model/design/NestedInitializationTest.java

finkn commented 10 years ago

Further tests have revealed that this is not a scoping issue per se. The problem is rather that scoping doesn't always occur. The apparent over-shadowing effect is a manifestation of ID collisions.

I will create a new, more appropriate issue, and this one should probably be closed.