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 | 18192 reads
|
Browse archives
Active forum topics |
Recent comments
16 weeks 4 days ago
16 weeks 4 days ago
16 weeks 4 days ago
38 weeks 5 days ago
43 weeks 8 hours ago
44 weeks 4 days ago
44 weeks 4 days ago
47 weeks 2 days ago
51 weeks 6 days ago
51 weeks 6 days ago