On 7/23/15 5:26 PM, Ziad Hatahet via Digitalmars-d wrote:
On Thu, Jul 23, 2015 at 2:00 PM, Adam D. Ruppe via Digitalmars-d <[email protected] <mailto:[email protected]>> wrote:I think it is actually kinda pretty: What about: int median(int a, int b, int c) { return (a<b) ? (b<c) ? b : (a<c) ? c : a : (a<c) ? a : (b<c) ? c : b; } vs. def median(a: Int, b: Int, c: Int) = if (a < b) { if (b < c) b else if (a < c) c else a } else if (a < c) a else if (b < c) c else b
This is a wash. If we want to discuss good things in Rust we could get inspiration from, we need relevant examples. -- Andrei
