<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#cccccc" text="#000000">
Michael Van Canneyt wrote:
<blockquote cite="mid:Pine.LNX.4.64.0809091639550.28210@gru.wisa.be"
type="cite">
<pre wrap="">
On Tue, 9 Sep 2008, Anton Kavalenka wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">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 - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/mailman/listinfo/fpc-devel">http://lists.freepascal.org/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
<pre wrap="">Bad example
Numbers are scalars
Strings are vectors
+= operator in not so straightforward as for numbers.
</pre>
</blockquote>
<pre wrap=""><!---->
bad example for you, but not for me: Handling strings should be as
easy as handling integers.
</pre>
<blockquote type="cite">
<pre wrap="">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.
</pre>
</blockquote>
<pre wrap=""><!---->
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 - <a class="moz-txt-link-abbreviated" href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freepascal.org/mailman/listinfo/fpc-devel">http://lists.freepascal.org/mailman/listinfo/fpc-devel</a>
</pre>
</blockquote>
<font size="-1"><font face="Helvetica, Arial, sans-serif"><span
class="moz-smiley-s1"><span> :-) </span></span><br>
This not a holy war C++ vs Pascal<br>
If C++ programmer don't know about fstream descendants - send him back
to school (or actually (he|she) is VB programmer).<br>
<br>
I only have a dream - controllable way of string assignment without any
magic like implicit call of _LStrAddRefCnt<br>
<br>
<br>
<br>
<br>
</font></font>
</body>
</html>