2 ms·
Still no removal of head and friends eh? Sad. I think elm has shown that it’s ok to avoid functions being partial out of the box, even you’re nowhere near a to
by masklinn 5y ago
Still no removal of head and friends eh? Sad.
I think elm has shown that it’s ok to avoid functions being partial out of the box, even you’re nowhere near a total language and you certainly allow the user to create partial functions or panic / throw errors.
- dllthomas 5y agoI mostly agree, but will note that I find "head and friends" unobjectionable and sometimes convenient at the ghci prompt. I think the right solution ultimately might be different preludes geared to different things, though doing the right dance around making the right things available in the right places (and unavailable in the wrong ones) while also making it easy to understand (and remember) which context you're working in and also not splitting the community is going to be... delicate.
- sullyj3 5y agoIt could be interesting to have an `Unsafe` convenience module that is imported by default in the repl, but not in source files. Maybe that would be too confusing for beginners though.
- dllthomas 5y agoAgreed, although I don't know that "unsafe" is precisely the line to draw. Anything that is going to be tremendously more useful interactively should be considered.