3 ms·
> Code is still being type checked, just not by default That's a pretty big caveat. In most cases "not by default" means "hardly ever". I feel like the change
by IshKebab 5y ago
> Code is still being type checked, just not by default
That's a pretty big caveat. In most cases "not by default" means "hardly ever".
I feel like the change would go over better if you were more honest about the only real reason to do this - speed. If you just said "type checking is too slow for `deno run`. We'd like to have it type check then but upon reflection we think the speed cost is worse than the cost of moving type checking to a non-default command."
That's very reasonable. "We don't think types should be checked by default" is just pretty crazy IMO.
Also, don't you cache the output so it's only slow on the first run?
- jcheng 5y agoI think that is exactly what they said? > Up to now, deno run has always automatically performed type checking on the code it was about to run, just before running it. This can sometimes be a nice user experience, but more often than not it is not what you want. The reason for this is often that type checking is really slow: it is often by far the single largest factor impacting the startup performance of your application.
- Vinnl 5y agoThe 'at runtime' part you cut off from that quote seems pretty relevant. Tests aren't run by default at runtime either.