<div dir="auto"><div class="gmail_quote" dir="auto"><div dir="ltr">Bernd Oppolzer <<a href="mailto:bernd.oppolzer@t-online.de">bernd.oppolzer@t-online.de</a>> schrieb am So., 3. Juni 2018, 11:56:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<br>
<div class="m_2994146323108775748moz-cite-prefix">Am 02.06.2018 um 15:14 schrieb Sven
Barth via fpc-pascal:<br>
</div>
<blockquote type="cite">
<div dir="auto">
<div class="gmail_quote" dir="auto">
<div dir="ltr">Mark Morgan Lloyd <<a href="mailto:markMLl.fpc-pascal@telemetry.co.uk" target="_blank" rel="noreferrer">markMLl.fpc-pascal@telemetry.co.uk</a>>
schrieb am Sa., 2. Juni 2018, 10:53:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">However as
Dennis points out + is also essential for vector operations.
<br>
Perhaps either leaving it to the programmer to define what's
needed <br>
would be the best approach, or alternatively splitting
dynamic arrays <br>
into mathematical vectors and non-mathematical collections.
Or relaxing <br>
the requirement that only predefined operators can be
redefined, so that <br>
something like _ could be used for concatenation.<br>
</blockquote>
</div>
<div dir="auto"><br>
</div>
<div dir="auto">That needlessly complicates the parser as the
compiler still needs to know them and they also need to be
part of its operator precedence rules. Don't complicate the
language for nothing! And in the end operator overloads are
one of the best examples for syntactic sugar as you can easily
achieve the same result with functions and methods. </div>
<div dir="auto"><br>
</div>
<div dir="auto">Regards, </div>
<div dir="auto">Sven </div>
</div>
<br>
</blockquote>
<br>
This is somehow off topic of course, <br>
but IMO it is strange to use + for string concatenation; <br>
I always have bad feelings about this. This whole thread would <br>
not exist, if FreePascal had gone another direction like PL/1, for
example, <br>
where the string concatenation operator is ||<br>
(and DB2, and - probably - other SQL dialects).<br></div></blockquote></div><div dir="auto"><br></div><div dir="auto">FPC inherited the +-operator for concatenation from the base language: Pascal. So there simply was no other route to take (not that anyone would have thought to take a different route). </div><div dir="auto"><br></div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF">
<br>
Where does this + for string concat come from? <br></div></blockquote></div><div dir="auto"><br></div><div dir="auto">Ask Wirth, he is the one who invented Pascal... </div><div dir="auto"><br></div><div dir="auto">Regards, </div><div dir="auto">Sven </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div text="#000000" bgcolor="#FFFFFF"></div></blockquote></div></div>