<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>I'm aware of the term "lazy programmer", and to say I suffer from
lazy programmer syndrome was still insulting because I pride
myself on checking edge cases and making sure my code was thorough
and robust (and if I overlook something in particular, I'll gladly
have it pointed out so it can be fixed). Up until now, there was
nothing to say that omitting an <b>else</b> branch in a <b>case</b>
block was lazy programming - for all I knew, it made sense because
it clearly implied that you wanted nothing special to happen if
none of the branches match - but to have the rules changed and the
accusation applied retroactively was a grave insult. Also, I
don't drink, smoke or do drugs, and I absolutely abhor swearing,
but you don't need to hear my life story. Still, I apologise for
my overreaction.<br>
</p>
<p>Back on point, I understand the people have spoken on this being
a warning, but I can see this causing a rift among the development
community when this warning suddenly gets thrown up on all their
projects. I can see the benefit though, especially with the
smaller enumerations. It just personally seemed that a warning
was too harsh, and as Ryan Joseph pointed out, where is the line
drawn? When is it acceptable to omit something? For something
like not initialising all of the fields in an object constructor,
I will happily have a warning thrown at me because it counts as an
uninitialised value, so long as it's not a false positive (since
some fields may get set in a different method that's called by the
constructor). However, should not including an <b>else </b>branch
in an <b>if</b> statement throw a warning - one can rightly argue
that that's stupid, but isn't the principle the same as the <b>case
</b>block?<br>
</p>
<p>I'm all for Pascal's design in forcing better programming
standards, even little things like the assignment and equality
operators are designed in such a way to prevent mistakes or subtle
backdoors like that infamous one that someone tried to slip into
the Linux kernel back in 2003
(<a class="moz-txt-link-freetext" href="https://freedom-to-tinker.com/2013/10/09/the-linux-backdoor-attempt-of-2003/">https://freedom-to-tinker.com/2013/10/09/the-linux-backdoor-attempt-of-2003/</a>).
Also a reason why I am vehemently against adding inline <b>var</b>
declarations like what was done in the most recent rendition of
Delphi, besides it violating the block design of Pascal.<br>
</p>
<p>Regarding the C-style assignment operators, some of the packages
that come with the compiler use them, and trying to build
everything without the -Sc flag will result in errors. Outside of
that, the biggest one that stands out is LazUTF8.pas for Lazarus -
for example: <tt>Result += (nx * ONEMASK) >>
((sizeof(PtrInt) - 1) * 8);</tt> - that should probably be
changed to something a little more Pascal-like, if <tt>Inc(Result,
(nx * ONEMASK) <b>shr</b> </tt><tt>((sizeof(PtrInt) - 1) *
8));</tt> is acceptable.<br>
</p>
<p>Gareth aka. Kit<br>
</p>
<div id="DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2"><br />
<table style="border-top: 1px solid #D3D4DE;">
<tr>
<td style="width: 55px; padding-top: 13px;"><a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank"><img src="https://ipmcdn.avast.com/images/icons/icon-envelope-tick-round-orange-animated-no-repeat-v1.gif" alt="" width="46" height="29" style="width: 46px; height: 29px;" /></a></td>
<td style="width: 470px; padding-top: 12px; color: #41424e; font-size: 13px; font-family: Arial, Helvetica, sans-serif; line-height: 18px;">Virus-free. <a href="https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=emailclient" target="_blank" style="color: #4453ea;">www.avast.com</a>
</td>
</tr>
</table><a href="#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2" width="1" height="1"> </a></div></body>
</html>