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 | 18140 reads
|
Browse archives
Active forum topics |
Recent comments
6 weeks 15 hours ago
6 weeks 18 hours ago
6 weeks 18 hours ago
28 weeks 1 day ago
32 weeks 3 days ago
34 weeks 1 day ago
34 weeks 1 day ago
36 weeks 5 days ago
41 weeks 3 days ago
41 weeks 3 days ago