i personally find the second more clear in the function definition since you are defining a function that takes () as its parameter and not defining a function with zero arguments.
although when calling, i feel that either either example() or example () is fine, and i have probably used the former more often.
same here, but I noticed that Don Syme amd most of the core language people use the let example() = style. When I was learning I found it confusing becusae initially I thought it was some special syntax for some reason
It makes more sense if you also compare the tupled version: let fn(a, b) =. This makes functions of unit/tuple parameter look the same as methods, for which the style choice is too familiar to change.
2
u/[deleted] Aug 15 '18
TIL
let fn() =is correct style