Re: Optional "then" and "do"
yuku wrote:
>
> I made changes to the parser.e so that the keyword "then" and "do"
> is optional (if the coder wants that it is still accepted).
>
> Reasons:
>
> - Less typing
>
> - Prevent mistakes of writing if <expr> do and for <expr> then
> which I did a lot of times (Kat too)
>
> If no real objection is made, I will commit it.
Can you give some examples of code doing this? I mean, how optional is it?
I'm mainly wondering whether the parser relies on the keyword "then" or "do"
being between <expr> and <statement>. I don't know enough about the internals to
say.
I've never really had a problem with "then" or "do" (except occasionally
forgetting "do") but I also don't have a problem with removing them if there is
no major effect.
--
A complex system that works is invariably found to have evolved from a simple
system that works.
--John Gall's 15th law of Systemantics.
"Premature optimization is the root of all evil in programming."
--C.A.R. Hoare
j.
|
Not Categorized, Please Help
|
|