[Haskell-cafe] Readable Haskell
kindaro at gmail.com
Sun Sep 20 12:02:51 UTC 2020
Ben, I think your proposition is righteous and uncontestable in
theory, and I stand by you. Unfortunately the practice hardly aligns
with the sermon.
No one writes Mathematics in monospace ASCII left to right. They go to
great lengths to actually type set things, generously use large and
small font, bold and cursive, write above and below the line, use
Greek and Hebrew and a myriad infix symbols. And for a reason —
compare a latex source of a _«notation heavy»_ paper with it rendered.
One may approach mathematical style in program source with generous
use of Unicode, but few dare. Even type setting code in proportional
font is considered heresy by many — just so that they may banish
proper tabulation and _indent with spaces_. So, even the proponents of
the mathematical style do not care to follow it as soon as it requires
a little effort. _(Hoω h∀rd may it be to g∃t some ∪nic⊕de on one's
kεyb∅arδ? See also the packages `base-unicode-symbols` and
`containers-unicode-symbols`.)_ Therefore I think for many it is
merely an excuse for writing ugly code.
The Darcs code you show illustrates the point Chris Done speaks for as
well. Observe top level names: `displayPatch`, `commuteConflicting`,
`cleanMerge` — quite German! Then there is `ctxAddInvFL` and
`mapFL_FL`, but that from other modules. Finally, I tried to find out
what `Prim` stands for — I went as far as to the index of `darcs` on
Hackage but no luck. And `prim` is the most frequent in the list of
words of the module, with 125 occurrences in normalized case.
Primitive? Primary? Prime? Primavera?
More information about the Haskell-Cafe