To: J3 J3/21-159 From: Robert Corbett Subject: Concise conditional expressions References: 21-157 Date: 2021-June-23 Paper 21-157 proposes two syntactic forms for conditional expressions. This paper proposes an alternative form. I am not happy with either of the syntactic forms for conditional expressions proposed in paper 21-157. The verbose form is far too verbose. The line noise form is better but still too verbose, and it uses the character ? which I prefer to leave unused. I propose the following syntactic form is ( predicate -> consequent [ : predicate -> consequent ] ... : alternative ) where the predicates are scalar logical expressions and the consequents and alternative are compatible expressions. The semantics of this syntactic form map to the semantics in the specs paper as follows ( predicate -> consequent [ : predicate -> consequent ] ... : alternative ) maps to if (predicate) then (consequent) [ elif (predicate) then (consequent) ] ... else (alternative) endif Examples: ( x >= 0.0 -> sqrt(x) : -0.0 ) ( present(a) -> a : present(b) -> b : 0 )