Re: Optional "then" and "do"

new topic     » goto parent     » topic index » view thread      » older message » newer message

Michael J. Sabal wrote:
> 
> Keep in mind, syntax errors (missing and, missing then, missing do) are much
> 
> easier to find and fix than logic errors (variable being assigned value 1
> instead of testing for value 1).
> 
> This feature should only be allowed by a without header, making then and do
> still required by default.
> 
> In other words, if the programs starts,
> }}}
<eucode>
> without thendo
> </eucode>
{{{


I don't think we should introduce syntax changes based on with/without settings
for two reasons:

1. Now the interpreter every time it hits a if, for, or while loop has to check,
"Do we require then/do?" if so, it has to do one thing, otherwise, do something
else. To program, this is easy, but do we want to introduce this into the parser?
I think we need to keep Eu as fast as reasonably possible.

2. Say John never uses then/do. Jane does. Now John join's Jane's project and he
has a hard time understanding some code, reading some code, etc...

I think Eu syntax should be the same on John's code or Jane's code.

If we allow setting of optional then/do's, we could then also, just as easy,
allow the setting of is the keyword "continue" or "next"? So in some code you
read you will see continue and in other code you will see next. That's taken a
bit further than suggested, but it just helps to make the point. Eu syntax should
be Eu syntax.

--
Jeremy Cowgar
http://jeremy.cowgar.com

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu