Haskell: A Great Procedural Language
20 comments
·January 19, 2025haskman
I gave a talk that goes more into what makes imperative programming better with Haskell compared to traditional imperative languages. https://speakerdeck.com/ajnsit/supercharged-imperative-progr...
In a nutshell, first class effects and built in set of patterns for composing them get rid of boilerplate code. Combine that with type safety and you can churn out relatively bug free code very fast.
imoverclocked
> and (c) requires a language feature (sequence points) to disambiguate in which order side effects get executed. With Haskell, we just don’t have to care.
Reading up to this point, I had to chuckle a bit. I have struggled with the Haskell type system more than I care to admit; It's almost never "we just don't have to care" when comparing to most other popular languages.
That being said, this article does a nice job of gently introducing some of the basics that will trip up somebody who is casually looking through code wondering what *> and <*> and <* do. As usual, there is a steep learning curve because of stuff like this all over the codebase. If I walk away for a month, I need to revisit >>= vs >> and other common operators before I can be productive. It probably doesn't help that I never actually speak to a human about these concepts so in my head it's always ">>=" and not "bind."
RobotToaster
Somewhat tangential, but the only software I know of that's written in Haskell is ImplicitCAD https://implicitcad.org/
yehoshuapw
hledger - a plain text accounting tool
TypingOutBugs
I worked on Cardano which is probably one of the larger Haskell projects (and Agda, which lets you write proofs and compile into Haskell!)
AlgebraFox
Private messenger for desktop and mobile platforms. It's mostly written in Haskell except for UI.
exe34
Having a quick look through their repos, it looks like they don't use Haskell for the mobile platforms?
> cpp-for-mobile > Template for cross-platform mobile app with native UIs and C++ core
MaxRegret
Don't forget Pandoc!
f1shy
I had no idea it was Haskell. So much for what I heard “no practical use”. Pandoc seems like very real life practical Application for me.
ryandv
The aura package manager for AUR, as well as the xmonad tiling WM.
weikju
Shellcheck is another useful one (linter for shell scripts)
thesz
This thing is awesome!
I tried it on couple of one liners and it found a couple of potential problematic points, one for each one liner.
tmountain
Haskell is an amazing type checker that’s occasionally used for writing software. ;-)
colordrops
Xmonad, though most people have moved on to other window managers at this point.
ulrikrasmussen
I still use it, it's the main reason I don't want to switch to Wayland. Everything looks and feels like it did 15 years ago, it's great!
bekantan
Still on XMonad, what are some good alternatives?
mbwgh
Not me, because I hate change!
protoman3000
This is a great take on monads.
null
> >> is an old name for >
I once had a hard to track down bug in some code making use of conduit[0], which is introduced using examples like `main = runConduit $ (yield 1 >> yield 2) .| mapM_C print`.
Dutifully replacing every occurrence of (>>) with (>), because it was more modern, suddenly changed the semantics somewhere, due to the fact that (>>) is defined with fixity `infixl 1 >>` and (>) as `infixl 4 >` - i.e. both are left-associated operators, but (*>) binds tighter than (>>) and some of the myriad of other operators you may encounter.
-- [0] - https://github.com/snoyberg/conduit