3 ms·
Yeah, that just strikes me as weird.
by 01100011 4y ago
Yeah, that just strikes me as weird.
- int_19h 4y agoIt makes it more consistent with statements, and more convenient for one-liner functions (e.g. those that just delegate to another function). It's also something that was adopted by other languages in the curly braces family - e.g. C# originally required curly braces for function bodies, but now allows you to write: int Sum(int x, int y) => x + y;