Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I often recommend developers learn and use at least one model checking language for this purpose. They’re really good at helping us reason about global properties of systems.

This isn’t unique to Haskell or functional programming at all. I’ve seen programmers from JavaScript to C++ suffer the same fate: tied into the boundaries of a single process they try to verify the correctness of their systems informally. By writing documents and holding long meetings or convincing themselves by prototyping. It’s only a matter of time before the find the error in production.

Hopefully it’s of no real consequence. The error gets fixed and it’s a week or two of extra work. But some times it triggers an outage that causes SLO’s to overshoot and SLAs to trigger which cost the company money. That outage could have potentially been avoided.

But it’s tough getting developers to see the benefit in model checking or any kind of formal methods. The hubris is often too great. It’s not just functional programmers! Although it surprised me when I was working with Haskell developers that so many were resistant to the idea.

(If one has experience and understands functional programming, learning TLA should be rather straight forward)

 help



I also took a stab at the versioning challenge back in 2019 and wrote a library with a friend in a fevered evening for type safe migrations in Haskell [0].

In practice it’s a bit tricky to use because it doesn’t enforce encoding the schema identifier in the serialized payload. Oops.

But between that, automated typing from examples, and refinement it might be possible to develop a system that can manage to validate the serialized data against the parser and have the serialization data appear in the type. At that point you could query the whole system.

[0] https://hackage.haskell.org/packages/tag/library


Wrong link?!

Oops! Sheesh. Phone. Sorry, here’s the proper link:

https://hackage.haskell.org/package/DataVersion




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: