2 ms·
f# has significant whitespace as well, yet I don't think it suffers from it at all. in python if you something like this: while (cond) if (someotherco
by Akronymus 5y ago
f# has significant whitespace as well, yet I don't think it suffers from it at all.
in python if you something like this:
while (cond)
if (someothercond)
//code
else
//morecode
somefunction()
//othercode
it can be unclear if "somefunction()" belongs in the else or not. This is IMO due to python being statement based.
While in f# the if evaluates to a value, so the type of it would more likely than not change and thus throw out a visible error. Hence me calling out the mixture specifically.
- leadingthenet 5y agoYou make a fair point, I guess I’m just used to it now. My IDE (PyCharm) adds indentation lines, so it’s never been particularly confusing for me. I do think F# is very interesting and quite pretty, though I’ve never used it.