[Scilab-Dev] codecheck() / slint() : semicolons at EOL... is not a rule.
Samuel Gougeon
sgougeon at free.fr
Wed Jun 8 12:15:20 CEST 2016
Hello,
The Scilab code checker currently proposes a coding rule according to
which each line of code should be ended with a semicolon ";":
/"Check that lines are finished with a semicolon"./
Scilab language is not C or C++. AFAIK, there is no need for this "rule"
in Scilab language.
So why proposing it?
A comma ",", a semicolon ";", or a EndOfLine "\n" can be used as
instructions separator.
I would be interested in learning why there should be 2 consecutive
instructions separators at the end of a line.
By the way, in scripts.sce, the ";" has another function (than
separator) that is to cancel the display of the output of the last
instruction. But the user may want to display it on purpose, and so to
not use any semi-colon.
Unless there is a rationale to the benefit of users supporting it, IMO
this rule should be removed from the set of defined ones, even if
following it is not mandatory. Simply because it is not a rule /at all/,
even for code styling.
On the opposite, avoiding every useless symbol is a part of code
styling, in such a way that the rule could be inverted: "/Check that in
a function no semicolons are appended to lines/".
Best regards
Samuel Gougeon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/dev/attachments/20160608/3bd46e9b/attachment.htm>
More information about the dev
mailing list