Closed gregtour closed 9 years ago
Looks good, and +1 to change function
to func
, but I don't feel the end func
seems better than the current style :hand:
If it would be end func
then endif
should be end if
aswell or the other way around
Fair enough, I changed "end func" back to "end."
The use of
end
as a keyword in both functions and conditional statements is confusing. Therefore, I propose that the keyword to end a conditional statement (if or else-if) should be changed toendif
.See the following code as an example of the potential confusion.
Although the two corresponding block-level statements, function and if, are different, they have the same terminating keyword.
With this proposed change the example would instead look like this.
Additionally, the syntax for functions should be changed to be both more concise and more transparent, so the symbol
function
will be changed tofunc
.With these changes, the example would become: