<div dir="ltr">Hi!<div><br></div><div>On Sat, May 17, 2014 at 3:58 PM, zxq9 <span dir="ltr"><<a href="mailto:zxq9@zxq9.com" target="_blank">zxq9@zxq9.com</a>></span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Saturday 17 May 2014 11:38:39 Vlad Dumitrescu wrote:<br>> Related to my previous post about literal whitespace characters, I wonder<br>
> if it might be a solution acceptable to most (all?) people to add compiler<br>
> options to control if such usage will emit warnings or not. This way one<br>
> can choose to go on as before or to get informed when there are<br>
> controversial constructs in the code.<br>
><br>
> At the moment I have two suggestions for such constructs:<br>
><br>
> - literal whitespace characters<br>
> - "ill-behaved" macros<br>
<br>
</div></div>The more information we can get from the environment (build tools, compiler,<br>
runtime, etc.) the better. Warnings, build status, dead code locations, etc.<br>
The more the better. This is especially true in controversial cases like the<br>
literal whitespace one that could so easily go unnoticed.<br>
<br>
I'm particularly fond of having the option of a logically independent lint-<br>
type pre-processing step that checks if code is conforming to whatever the<br>
community canon is and raises warnings (or interrupts the build, etc.) before<br>
the compiler gets a hold of the code. The reason I like this way more than<br>
making everything a compiler warning is that it leaves the compiler<br>
implementation logically dependent only on the language definition, and the<br>
linting process free to embrace as much arbitrary knowledge from the community<br>
as the implementers have time for. It also leaves the option of different<br>
linters/rules to be inserted in that step instead of only leaving room for the<br>
One True Way and drastically limits the size of the compiler manpage by<br>
preventing compiler option proliferation over time.<br></blockquote><div><br></div><div>The linter is already separated from the compiler, it is called as a separate stepfrom the compile proper. It's good idea to make it modular, so that linting steps can be added even by third parties. The current implementation looks like it just goes through the different checks sequentially, so it shouldn't be a huge amount of work to extract the steps to separate modules. I can look into it.</div>
<div><br></div><div>regards,<br></div><div>Vlad</div><div><br></div></div></div></div>