2 ms·
Here is an implementation of Timsort in Haskell that also exhibits the bug: https://github.com/timjb/haskell-timsort/commit/d9c3e1e454c7d338320f8c2aa12e882921d
by ngrilly 12y ago
Here is an implementation of Timsort in Haskell that also exhibits the bug:
https://github.com/timjb/haskell-timsort/commit/d9c3e1e454c7d338320f8c2aa12e882921d42828 https://github.com/timjb/haskell-timsort/commit/d9c3e1e454c7...
I find interesting that this Haskell version of Timsort also exhibits the bug, despite Haskell having a type system more advanced than Python or Java. This is a reminder that type checking is not a magic bullet, and is hardly enough to prove a program correctness. Formal proofs and whole program static analysis are still necessary, with or without an advanced type system:
http://www.cl.cam.ac.uk/~srk31/blog/2014/10/07/ http://www.cl.cam.ac.uk/~srk31/blog/2014/10/07/