Re: Optional "then" and "do"
- Posted by Larry Miller <larrymiller at saskt?l?net> May 15, 2008
- 994 views
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. I know the changes have already been made at this time but I must still object. It is not too late to change this. Yes, removing the necessity of typing "do" and "then" may speed initial coding, at least for some. But not for me, and I suspect many others as well. I will continue to add them, even for a quick and dirty test. As any experienced programmer would agree, the real cost in writing software is not the initial coding. It is in debugging and maintenance. I believe that "do" and "then" make it easier to read code, particularly when it is complex and written by others. Rob Craig had a reason for adding "do" and "then". If they are not needed by the interpreter they must have been for the benefit of the programmer. After reading many of his posts about the design of Euphoria I have come to the conclusion that everything was well thought out, nothing was done on a whim. And I think few would disagree, most of these decisions were correct. We might disagree about the details but that will always be inevitable in this world. Larry Miller