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

> Not all functional languages have static typing.

Even the multi-paradigm, late-bound languages that are adding functional programming are adding static typing, e.g. TypeScript and mypy.

> No type checker will catch this error...

Sure, math is hard. In the domain of structural transformations, one's intuition combined with a decent type checker really does work, though.

Especially, I've done large refactorings of complex transformations, tracked down the typing errors, and then been pleasantly surprised when my test-suites passed the first time.

> sqrt :: double -> double

I can use QuickCheck[1]:

    prop_Sqrt_Sqr n = sqrt n * sqrt n == abs n
Because it can exploit the type system, it can then plug in various values of Double to see if squaring my square root squares properly.

[1]: http://www.cse.chalmers.se/~rjmh/QuickCheck/manual.html



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: