<div dir="ltr"><div dir="ltr">On Fri, Jun 7, 2019 at 3:44 PM Sven Barth via fpc-devel <<a href="mailto:fpc-devel@lists.freepascal.org">fpc-devel@lists.freepascal.org</a>> wrote:<br></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<div class="gmail-m_1584015262432158899moz-cite-prefix">"0..5" defines a new type. "set of (Alpha, Beta, Gamma)" defines a
new type. "record a, b: longint end" defines a new types.</div></div></blockquote><div><br></div><div>Building on my last reply, also, here's an example that shows what I see as the actual hypothetical ramifications of those in method signatures:</div><div><br></div>program Example;<br><br>{$mode ObjFPC}<br><br>type Letter = (A, B, C);<br><br>{ this *could* be valid code, because something like "TakesASet([A, C])" is valid code }<br>procedure TakesASet(ASet: set of Letter);<br>begin<br>end;<br><br>{ this *could not* be valid code, because D, E and F do not exist outside to actually call it with }<br>procedure ImpossibleTakesASet(ASet: set of (D, E, F));<br>begin<br>end;<br><br>{ this *could* be valid code, because something like "TakesARange(2)" is valid code }<br>procedure TakesARange(ARange: 0..3);<br>begin<br>end;<br><br>{ this would be nonsensical IMO, because you could only call it with a<br> variable of an existing named record type with identical fields, making it pointless }<br>procedure TakesARecord(ARecord: record A, B: LongInt; end;);<br>begin<br>end;<br><br>begin<br><div>end. </div></div></div>