C#'s conditional attributes

2010-07-12 Thread Andrei Alexandrescu
Just saw this on reddit: http://www.reddit.com/r/programming/comments/cocww/little_known_c_feature_conditional_attributes/ and was wondering whether this can be done in D by relying on lazy parameters and the inliner. Here's the test bed: void log(A...)(lazy string format, lazy A objects) {

Re: C#'s conditional attributes

2010-07-12 Thread Andrei Alexandrescu
On 07/12/2010 01:10 PM, Walter Bright wrote: Andrei Alexandrescu wrote: Just saw this on reddit: http://www.reddit.com/r/programming/comments/cocww/little_known_c_feature_conditional_attributes/ and was wondering whether this can be done in D by relying on lazy parameters and the inliner.