if and else provide conditional execution of statements. For example:
if (fruit.IsYellow()) {
Print("Banana!");
} else if (fruit.IsOrange()) {
Print("Orange!");
} else {
Print("Vegetable!");
}
This code will:
Banana! if fruit.IsYellow() is True.Orange! if fruit.IsYellow() is False and fruit.IsOrange() is
True.Vegetable! if both of the above return False.TODO: Flesh out text (currently just overview)
Most discussion of design choices and alternatives may be found in relevant proposals.