On Thu, 11 Jun 2009, Daniël Mantione wrote:
Op Thu, 11 Jun 2009, schreef Michael Van Canneyt:
On Thu, 11 Jun 2009, Jonas Maebe wrote:
I would think it is a natural extension of procedural overloading ?
It's not that simple. Properties can be both hidden variable access as well
as procedure access. Variable overloading is not allowed, because it causes a
lot of issues, i.e.:
var a:word;
a:char;
begin
a:=1;
a:='!';
writeln(a); {what does this mean??}
end;
Property overloading gets you the same issues, i.e. in the example above you
could replace both variables with properties and answer the same question.
Considering this, I do not think it can considered a logical extension of
procedure overloading.
Stop:
It's only for indexed properties, not for normal properties. The index type
uniquely determines which one you want. Just as in a procedure, the argument
type determines which one you want.
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel