3 ms·
I tend to use parenthesis by default even if they're not necessary, and I also prefer a space before the opening paren. In F# you can use `f()` or `g ()`, but
by sparkie 3y ago
I tend to use parenthesis by default even if they're not necessary, and I also prefer a space before the opening paren.
In F# you can use `f()` or `g ()`, but if you are chaining them, `f ().g ()` is not the same thing as `f().g()`, so you are forced to write `(f ()).g ()` if you use spacing.
- Akronymus 3y ago> In F# you can use `f()` or `g ()`, but if you are chaining them, `f ().g ()` is not the same thing as `f().g()`, so you are forced to write `(f ()).g ()` if you use spacing. Never encountered it, but after thinking it through, I think I see why it behaves differently. a standalone `()` is the unit value, while a `f()` is a function call. And `f ()` is passing the unit value into the function f. And now I think I can't unsee that wart on f#. (I personally mostly use the `f()` style of function calls)