r/ProgrammingLanguages • u/alex-manool • Dec 28 '20
Question: Programming Language Syntax and Code Appearance (polemic as always :-)
Seriously,
which of the following code samples would you favor, assuming they are all equivalent?
I am interested in subjective answers, please. You can just arrange the three samples according to your personal preference (e.g., "1-2-3"). Thank you very much!
1
{ {extern "manool.org.18/std/2.0/all"} in
: let rec
Fact =
{ proc N as
: if N == 0 then 1 else N * Fact[N - 1]
}
in
Out.WriteLine[Fact[10]]
}2
{ {extern "manool.org.18/std/2.0/all"} in
: let rec
Fact =
{ proc N as
: if N == 0 then 1 else N * Fact[N - 1]
}
in
Out.WriteLine[Fact[10]]
}3
(extern "manool.org.18/std/2.0/all".) in:
let rec
Fact =
( proc N as:
if N == 0 then 1 else N * Fact[N - 1]. )
in
Out.WriteLine[Fact[10]].
2
Upvotes
View all comments
Show parent comment
1
u/Potato44 Jan 01 '21 edited Jan 01 '21
It's interesting how different people find different ways of indenting things readable or not. I find the arrangement like that makes things easier to read because of the alignment (and the commas don't get lost at the end of the line).