09-09-2015, 04:18 PM
boriel Wrote:Short-circut evaluation is not yet implemented, neither is tail recursion (I would like to implement both of them). Of course, it might make your program bigger, but I think it's necessary.
Please keep in mind that introducing short-circut evaluation into an existing language can potentially break lots of already released programs, since it would change program behavior in cases like this:
Code:
IF move(player1) <> 0 OR move(player2) <> 0 THEN
... ' At least one player moved successfully
END IF
In order to avoid breaking existing code, either introduce short-circut evaluation only for purely evaluation expressions (without routine invocations), or make short-circut evaluation optional (disabled by default).
Personally I like short-circut evaluation, but I wouldn't like to find out that some of my released games in ZX BASIC stopped compiling properly when ZX BASIC changed its behavior
