> >>>Sorry, the only language that does what ? > >> > >>var strlist : TStringlist; > >>strlist := Tstringlist.create; > >> > >>I know strlist is a Tstringlist, the compiler knows it too as I have > >>declared it so why do I have to spell it out in the creation process? > > > > In C++: > > > > TStringList strlist; > > > > strlist = new TStringList; > > > > How is that shorter ? > > okay but its still redundant. Why does the compiler need to have it > spelt out twice? Why cant the compiler deduce that as the pointer is > declared as TStringlist therefore it creates a TStringList?
Because the pointer might not be. Polymorphism, you know? :-) -- Regards, Christian Iversen _______________________________________________ fpc-devel maillist - fpc-devel@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-devel