Hacker News new | ask | show | jobs
by jwlato 1598 days ago
It's hard to build systems with hard real-time requirements with GHC Haskell.

The vast majority of systems people build do not have hard real-time requirements. People have built video games, real-time audio, and all sorts of other soft-real-time systems with Haskell

2 comments

I've worked on a real-time requirements system with GHC Haskell and it's certainly possible!
> soft-real-time systems

No they aren’t soft real time systems either, most applications in general a don’t satisfy soft real time requirements.

Most people hack it but hacking it with Haskell requires rewriting your pure functional code into a form that strongly resembles procedural languages like C. This defeats the purpose of a lazy pure functional programming language.

If most applications don't satisfy soft real time requirements either, then maybe those requirements aren't really important for most cases.

There's only one industrial Haskell codebase I've worked on, and although parts of it were very procedural, that was probably less than half the codebase, even including the IO-bound code. Sure it's one way to use the language, but it's certainly not the only one.

> If most applications don't satisfy soft real time requirements either, then maybe those requirements aren't really important for most cases.

Most applications are buggy and crappy. Sure, if you’re churning out minimally passable garbage for a paycheck, then don’t worry about correctness or timing requirements and pray for the best. Cf. Slack desktop client. If you are producing something that necessarily has a higher quality bar then these things matter, e.g. an aircraft control interface. Haskell isn’t up to the challenge (imagine indefinitely waiting without feedback for a long-lived heavily nested thunk to evaluate when you press “land” ouch).