Michael Van Canneyt wrote:
On Tue, 9 Sep 2008, Anton Kavalenka wrote:
Nothing stops you from doing this yourself.
But for something as basic as text operations, I think this is bloat.
Imagine that you would have to do
I:=TInteger.Create(1);
J:=TInteger.Create(2);
I.Add(J);
What kind of language do you end up with then ? Utterly unreadable, and
slow, because heavily relying on the heap.
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
Bad example
Numbers are scalars
Strings are vectors
+= operator in not so straightforward as for numbers.
bad example for you, but not for me: Handling strings should be as
easy as handling integers.
Who else except Pascal developers knows that s:=s1+s2 is the string
concatenation and invokes lot of hidden stuff that is out of control.
This is the beauty of pascal: you don't need to know, and there should
be no need.
I once asked a C++ programmer how to read a file full of strings.
After 2 hourse he came to tell me he didn't know.
In Pascal, it takes about 1 minute to code, because strings are a
basic type, handled on the stack. And rightly so.
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel
:-)
This not a holy war C++ vs Pascal
If C++ programmer don't know about fstream descendants - send him back
to school (or actually (he|she) is VB programmer).
I only have a dream - controllable way of string assignment without any
magic like implicit call of _LStrAddRefCnt
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel