AllBASIC

BASIC Developer & Support Resources => Interpreters => Topic started by: Marcus on December 16, 2011, 12:05:37 pm

Title: Short sircuit evaluation
Post by: Marcus on December 16, 2011, 12:05:37 pm
A famous (at least to me) game programmer started using naalaa (the language is meant for new beginners, so it came as a surprice to me). He emediately complained about the lack of short sircuit evaluation in logic expressions. I fixed it (only 6 lines of c code, luckily) and updated naalaa. But now I'm wondering, are there any disadvantages with this? I know some (old) languages use "and"/"or" for non short sircuit evaluation and "and then"/"or else" for short sircuit evaluation.

For me personally it doesn't really matter. I always write code as if short circuit evaluation didn't exist.
Title: Re: Short sircuit evaluation
Post by: John on December 16, 2011, 06:13:34 pm
Quote
I always write code as if short circuit evaluation didn't exist.

True top/down using GOTO/GOSUB along the way?