Do object models in general violate that principle?
In practice they most definitely do. In theory, I'm sure all OOP proponents would say they don't. For the record, that's _all_ I'm going to say about OOP. I am _not_ going down that road again.
There is one more thing I'd like to point out about something that is being associated with inline variables which has little to do with inline variables which is, in this code:
for var i : integer := 1 to 10 do ;
In that code the variable "i" isn't inline. if anything it is "in for" <chuckle> which is a completely separate and, different, hack.
For those who doubt that, the following code doesn't work
for var i : integer := 1 to 10 do
begin
var i : integer;
var x : integer;
x := i * 2;
end;
A compiler that allows defining the index variable in the "for" statement has to pretend the variable is declared within a "begin"/end" block even if one isn't present to prevent the redeclaration of the variable in a following "begin"/"end" associated with the "for" loop. That's the problem with hacks... they have to account for inconsistencies created by the hack.
In case the above is not clear, the problem is: where does the scope start ? does it start at the "for" where "i" is declared ? or does it start at the "begin" ? ... since you'll likely get a "duplicate identifier" the logical conclusion is that the scope starts in both places (unless someone wants to claim an exception for the "for" statement but, that won't work because if the "begin" no longer starts a scope then the variable "x" cannot be declared in that location...
)
(it's no wonder this stuff comes from C... <chuckle>)