I
I fully agree with you. I would like the object oriented way of strings
also - but I stopped asking for that ;) There are a lot of advantages
over the small amount of disadvantages. Of course I dont like this one:
S := TString.Create('');
But a built in class TString that is managed by the compiler.
PS : Maybe i'm a littlebit more up to date about todays concepts of
object oriented languages - maybe because I know him personally
http://en.wikipedia.org/wiki/Bertrand_Meyer
There were a lot of interesting discussions, etc... altough I dont like
Eiffel :)
and also this guy was one of my profs:
http://en.wikipedia.org/wiki/Niklaus_Wirth
greetings
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
Jet another approach:
var
s:string;
intStr:TInternalStringClass absolute s;
TInternalStringClass(s).AsUTF8:='Some string';
writeln('String length=',intStr.length);
TMyStingClass=class(TInternalStringClass)
class function LoadFromResource(nResId:integer)
end;
intStr.LoadFromResourcse(nResId);
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel