Francesco Casella

Results 1758 comments of Francesco Casella

> What actually _could_ be useful in Base Modelica would be to say that global name lookup means lookup inside the Base Modelica package. That is, global name lookup would...

> I suppose you didn't consider my [#3550 (comment)](https://github.com/modelica/ModelicaSpecification/pull/3550#issuecomment-2202170396)? Sorry, I missed that. From a modeller's point of view, using the same name for a model and for a record...

> I think the source of the problem is that Base Modelica is (currently) inheriting the full Modelica lookup rules Sure > even though we are imagining Base Modelica code...

@henrikt-ma, another thought on this from my side. The main source of confusion here is that Modelica has all these very complicated relative pathname lookup rules: enclosing scopes, inner/outer, encapsulated...

@henrikt-ma you are right, I should have worked out a few examples before posting it. I have to think more about it. Before we continue the discussion, though, I need...

> I don't know, but flattening out hierarchy is a non-trivial operation where lookup contexts in the lowered model are quite different from the original full Modelica. Absolutely. I guess...

At the end of the day, I understand that the issue captured by your MWE (I modified it slightly to make it valid) ```modelica model r record r Real x;...

> I still don't know if there is a simple solution here, but at least I think we are on the same page now. The idea of making sure shadowing...

@henrikt-ma if we decide to avoid shadowing by adding unique compiler-generated suffixes, this case is no big deal either: ```modelica package 'M' constant Integer 'P.n$const_1' = 5; model 'M' Integer...

> On the other hand, wouldn't it be nice if we could ensure that the package constants actually _can_ use mangled names that will be the same across tools? If...