The following warnings occurred:
Warning [2] Undefined array key 0 - Line: 1677 - File: showthread.php PHP 8.2.31 (Linux)
File Line Function
/inc/class_error.php 157 errorHandler->error
/showthread.php 1677 errorHandler->error_callback
/showthread.php 916 buildtree




Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
output ASM
#8
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 Smile
Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 1 Guest(s)