<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Dirk,<div><br></div><div>If you still have doubts, you are better man than most of us :)</div><div><br></div><div>Thanks in advance!</div><div><br><div><div><div>On Jul 6, 2012, at 9:54 PM, Dirk Muysers wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html;charset=iso-8859-1" http-equiv="Content-Type">
<meta name="GENERATOR" content="MSHTML 8.00.6001.19258">
<div style="PADDING-LEFT: 10px; PADDING-RIGHT: 10px; PADDING-TOP: 15px" id="MailContainerBody" leftmargin="0" topmargin="0" canvastabstop="true" name="Compose message area">
<div><font face="Arial">Daniel, with my apologies, sometimes I wonder if you do it
on purpose.</font></div>
<div style="FONT: 10pt Tahoma">
<div><br></div>
<div style="BACKGROUND: #f5f5f5">
<div style="font-color: black"><b>From:</b> <a title="mailto:dabenavidesd@yahoo.es
CTRL + Click to follow link" href="mailto:dabenavidesd@yahoo.es">Daniel Alejandro Benavides D.</a> </div>
<div><b>Sent:</b> Friday, July 06, 2012 9:17 PM</div>
<div><b>To:</b> <a title="m3devel@elegosoft.com" href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a> ; <a title="mailto:rodney_bates@lcwb.coop
CTRL + Click to follow link" href="mailto:rodney_bates@lcwb.coop">Rodney M. Bates</a> </div>
<div><b>Subject:</b> Re: [M3devel] A question for our language
lawyers</div></div></div>
<div><br></div>
<table border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td valign="top">Hi all:<br>English men say array is a sequence of elements
(of a common type), and a BOOLEAN is an enumeration so you might attack
that distinction to define what is an initialized boolean or array of
boolean in common compilers, gcc javac, etc, which if is java-like is
really undefined:<br><br><a title="http://www.drdobbs.com/architecture-and-design/the-humble-boolean-deserves-help/232900836?cid=DDJ_nl_upd_2012-05-02_h&elq=cef656ee4d6c4bca996b337620b98f85
CTRL + Click to follow link" href="http://www.drdobbs.com/architecture-and-design/the-humble-boolean-deserves-help/232900836?cid=DDJ_nl_upd_2012-05-02_h&elq=cef656ee4d6c4bca996b337620b98f85">http://www.drdobbs.com/architecture-and-design/the-humble-boolean-deserves-help/232900836?cid=DDJ_nl_upd_2012-05-02_h&elq=cef656ee4d6c4bca996b337620b98f85</a><br><br>So
I prefer non-uniform rules for records different of Sets, Arrays, and
records as that, note that NEW expression doesn't allow constructors to be
used, so the only thing you can use is array of uninitialized variables
(but current gcc or javac, etc are really wrong in that)<br><br>This means
we need to address this by either a native backend (NT386) or by another
language for that matter.<br><br>Thanks in advance for any comments you
may have<br><br>--- El <b>vie, 6/7/12, Rodney M. Bates
<i><<a href="mailto:rodney_bates@lcwb.coop">rodney_bates@lcwb.coop</a>></i></b> escribió:<br>
<blockquote style="BORDER-LEFT: rgb(16,16,255) 2px solid; PADDING-LEFT: 5px; MARGIN-LEFT: 5px"><br>De:
Rodney M. Bates <<a href="mailto:rodney_bates@lcwb.coop">rodney_bates@lcwb.coop</a>><br>Asunto: Re: [M3devel]
A question for our language lawyers<br>Para:
<a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>Fecha: viernes, 6 de julio, 2012 13:27<br><br>
<div class="plainMail"><br><br>On 07/06/2012 04:23 AM, Dirk Muysers
wrote:<br>> The report says (2.6.9)<br>> "The values in the array
will be arbitrary values of their type."<br><br>> Now, ParseParams in
its "init" method allocates an array of BOOLEANs<br>> and relies on
the fact that it is supposedly initialised with FALSE
values.<br><br>> At the other hand the report says (2.2.4)<br>>
"The constant |default| is a default value used when a record is
constructed or allocated"<br><br>> If I allocate an array of records,
which statement is stronger:<br>> - the array contains arbitray
record values ?<br>> - the array record fields will be initialised to
their default values?<br><br>Admittedly unclearly if not misleadingly
worded. Better wording might be<br>to say each element is
initialized as it would if it were a scalar variable<br>of its
type.<br><br>I think the way to interpret this is that the array itself
does not impose<br>any initialization, but this fact will not eliminate
initialization<br>imposed by other rules, specifically, the type of the
array's elements.<br><br>This is a language quirk that I have always
been deeply ambivalent about.<br>The type safety would go down the drain
if variables were not initialized<br>to a bit pattern that represents
some value of the type, so we have to pay<br>the performance penalty of
executing initialization code. So why not define<br>which value of
the type is initialized-to and get behavioral predictability<br>for
free? And further save redundant initialization in the likely
event<br>that the compiler's chosen arbitrary value happens to match
what the<br>programmer wants?<br><br>(OK, a smart enough optimizer might
figure this out, but we could have<br>had it even with a naive
compiler.)<br><br>The contrary case is a type whose compiler-chosen
representation happens<br>to use every bit pattern in the allocated
space for a value of the type.<br>Here, no compiler-generated runtime
initialization is needed.<br><br>Also, the rule we have might sometimes
encourage programmers to at least give a<br>millisecond's thought to
whether they need to do some explicit initialization.<br><br><br>>
The ParseParams "init" method is obviously erroneous and works
only<br>> by virtue of a happy combination of circumstances.<br>>
But how is the report to be interpreted in the second
case?<br></div></blockquote></td></tr></tbody></table></div>
</blockquote></div><br></div></div></body></html>