Re:Things I Was Wrong About: Types
by throwaway894345 on Sunday September 27, 2020 @07:40PM
(#24611186)
No one is talking about abstract type theory; we’re talking about the intuition you use to write maintainable, correct software including CSV munging.
[ Parent
| on HN ]
I don’t care if my throw away CSV munger is formally safe/sound or maintainable. I care if it gives me correct results, once, as quickly and effortlessly as possible. Which is why very few people fire up GHCi/rustic/javac for that, but instead use awk/shell/Python or something similar.
OTOH, sometimes the CSV munger one writes today is still in use five years later, when the input CSV has a UTF-8 character for the first time, and suddenly it crashes and no-one knows where the bug could even be.
UTF-8 support is completely orthogonal to static typing. There are dynamically typed languages that handle it great, and statically typed languages which have garbage support for it.
In general I know what you mean though. “What if this CSV parser turns out to be really important?” If you think there’s a high probability of that, do it in a statically typed language then. 99.9% of data munging I’ve done have been throwaway programs to answer a question to inform some decision or help refine a mental model.
Re:Things I Was Wrong About: Types
by throwaway894345 on Tuesday September 29, 2020 @08:57AM
(#24627168)
Frequently that answer is important and you want extra confidence that you calculated it correctly.