Re: Digest for EUforum at topica.com, issue 6333
- Posted by Robert Craig <rds at RapidEuphoria.com> Jan 09, 2007
- 492 views
Chris Bensler wrote: > The point is that the problem of side-effects is now much worse, I wouldn't say it's worse, just different. And at least now it's better documented. Other languages, such as C/C++ leave the order of operations in this case deliberately undefined, and in fact there are incompatible differences between C/C++ compilers. > for the sake of a very small improvement in speed. I didn't do the $ feature to gain speed, although it does in some cases. I did it because I got tired of writing out stuff like: rob_craig[1..length(rob_craig)-1] or rob_craig[chris_bensler][1..length(rob_craig[chris_bensler])-1] instead of simply: rob_craig[1..$-1] or: rob_craig[chris_bensler][1..$-1] I wasn't happy when I realized that some existing (weird) code would break, and I could have avoided the breakage by making the implementation of $ very inefficient in some cases. So inefficient, that I would never have implemented $ that way. Many people wanted something like $, so I decided to do a proper, efficient implementation of it (requiring a huge change to the subscripting code), while letting some old, weird, code break. I personally found one place in Language War that depended on the old behavior. It surprised me to realize that the code relied on this behavior, because it was not deliberate on my part. It was really just luck that it worked. Having to split one statement into two was easy, and made the logic much easier for anyone else to understand. Regards, Rob Craig Rapid Deployment Software http://www.RapidEuphoria.com