User loginNavigation | 
   
Variation of C's inline conditionalThe C language has an inline conditional statement, in the form: I'm looking for a form of the inline conditional that doesn't repeat the "somebigexpression" in the above situation, without assigning it to an intermediate variable.  I was thinking something along the lines of this syntax: So two questions... 1) Would this be useful enough in practice to bother adding it to a language (i.e., does it make the code more clear v.s. assigning the original expression to a temp variable)? and 2) Does another language already have a syntax that accomplishes the same thing that I can borrow from? Thanks. By derekp at 2008-03-13 01:31 | LtU Forum | previous forum topic | next forum topic | other blogs | 18450 reads 
 | 
   Browse archives
 Active forum topics | 
  
Recent comments
1 day 2 hours ago
1 day 2 hours ago
6 days 3 hours ago
6 days 3 hours ago
6 days 3 hours ago
3 weeks 6 days ago
4 weeks 5 days ago
4 weeks 5 days ago
4 weeks 6 days ago
4 weeks 6 days ago