<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">El 11/05/2016 a las 16:38, Michael Van
Canneyt escribió:<br>
</div>
<blockquote
cite="mid:alpine.DEB.2.10.1605111631120.11829@home.telenet.be"
type="cite">
<br>
<blockquote type="cite">FPC 3.0 adds unsafe auto-conversions
<br>
</blockquote>
<br>
Why do you think it is unsafe ?
<br>
<br>
</blockquote>
I have an answer for this.<br>
<br>
In short:<br>
Different codepage strings and raw strings should be considered
different incompatible types. Pascal is a hardtyped language, and I
love that, and codepages are prone to errors (all these threads
prove it).<br>
<br>
Something about codpages needs a second thought.<br>
<br>
a) There shouldn't be automatic conversion at all.<br>
b) The codepage of a string shouldn't change when you assign a
string with another codepage, just rise an error.<br>
c) Corollary of previous premises: Empty strings should also have
codepage.<br>
<br>
Extra 1) Beside calling SetSetcodepage, it would be handy that you
could set the codepage when you declare a string. I don't mean
codepage should be statically typed, just it would be handy.<br>
Extra 2) Being able to set the codepage statically, so that
mismatch codepage could be detected in compiler time, would be
handy. In this case I do mean codepage could also be statically
typed,<br>
<br>
<pre class="moz-signature" cols="72">--
Saludos
Santi
<a class="moz-txt-link-abbreviated" href="mailto:svaa@ciberpiula.net">svaa@ciberpiula.net</a></pre>
</body>
</html>