Re:Ask HN: Why the Linux Kernel doesn't have unit tests?
by Veuxdo on Friday November 25, 2022 @10:18AM
(#33743111)
Not for nothing, but static type checking isn't some kind of fad. It's been the rule, not the exception, since the 1980s at least.
[ Parent
| on HN ]
Re:Ask HN: Why the Linux Kernel doesn't have unit tests?
by IgorPartola on Friday November 25, 2022 @10:30AM
(#33743253)
For some languages it’s a whole lot more important than others. Python and JavaScript are memory-safe so you don’t need to worry about writing a bigger object into a too-small memory allocation.
You will discover that you reversed the order for parameters to a function by running your code with much less effort than annotating all your code. This type annotation is entirely useless:
def get_user(email: str, create_if_not_exists: bool)