== Quote from Steven Schveighoffer ([email protected])'s article > Note that there is a workaround for 1: > DT noclosure(DT)(scope DT d) if(is(DT == delegate)) > { > return d; > }
I know, but this defeats the nice zero-boilerplate solution to getting type inference and immutability when you want to conditionally assign one of several values to a variable. > Also note that next to memory allocation, lack of inlining is the biggest > performance problem. It's not negligible (in case that is what you were > saying, hard to tell from all the negatives ;) Clarification: I didn't mean lack of inlining is negligible in general, only for this use case. If you have a bunch of complicated conditions and whatnot in the function body then the extra 5 clock cycles or so for a function call probably don't mean much
