News for hackers. Stuff that matters.
Re:Functions and algorithms implemented purely with TypeScri... by mrkeen on Wednesday July 05, 2023 @11:24AM (#36601701)
> Why don't we just design our software in such a way that the interfaces between components are simple so that we can easily remember which functions accept what kinds of input

Good luck in defining 'simple'. For me, a simple function only accepts inputs which it knows how to handle, and performs no side effects. Bonus points if it always terminates. Personally I cannot maintain this level of simplicity without a type checker.

But on the plus side, you're still allowed to remember what your functions accept! The checker only kicks in if get it wrong.

There are no comments on this comment yet.