3 ms·
Type checking absolutely should not run during runtime. When I’m refactoring I need to be able to test that things are partly working as I go. If I have to get
by erikpukinskis 4y ago
Type checking absolutely should not run during runtime. When I’m refactoring I need to be able to test that things are partly working as I go.
If I have to get an entire application’s types perfect before even running the code that’s a huge DX slowdown.
Types should pass, strictly, before merging.
- SyrupThinker 4y ago> When I’m refactoring I need to be able to test that things are partly working as I go. Personally speaking, isn't that exactly the value of having a type system in the first place? If it still type checks after the refactor it ideally* is still working. Unless of course some system boundaries changed or there is some dynamic component. I suppose we both come from different philosophies here. I write out the types for a program first, then the behavior follows through. If I cannot properly determine the types I escape with dynamism. You seem to dynamically write the system up and then determine the types, do I interpret that right? The current setup might be a better experience then, but I think the default matters here. In my little bubble I've encountered more libraries with broken typing since type checking has been reduced, so I perceive it as a net-negative. You end up having to explain that you need to take manual precautions to actually get type checking. Of course this could just be due to the growing user-base and the higher probability of hitting a "wrongly typed" library, so it will remain to be seen how much impact it has. I'm used to the --check flag by now :) * How ideal depends on how expressive the type system is.
- brundolf 4y agoWorth clarifying that the change was to the default behavior. There was always a --no-check option to skip checking for those who wanted to