3 ms·
> Scala, Haskell, even Typescript have painful compile times. Can’t speak to the first two, but in some places TS has pathological compile times when you’re tr
by eyelidlessness 6y ago
> Scala, Haskell, even Typescript have painful compile times.
Can’t speak to the first two, but in some places TS has pathological compile times when you’re trying to give more information to the compiler. A recent example is trying to appease type inference on a set of generics where a wrapped function couldn’t narrow types from its wrapper even though they were totally valid but mostly inferred. I wrote a type guard which passed the same values with explicitly narrowed types and... it just never completes. Pegs all my CPU cores in VSCode. Used throughout my project and effectively kills type checking.
I know enough about the underlying function I’m calling that I just cast to any, but now I have a mine waiting to be triggered.
To be fair, this is in frontend land where it’s not TS’s fault that the types they support are so bonkers to begin with. But holy hell it’s not always obvious what’s gonna cause compile times to skyrocket.
- scns 6y agoYou can try ReasonML/Bucklescript/ReScript. WARNING it may spoil you, by compiling in fractions of a second and make waiting for tsc miserable. Only do it if you have a high frustration tolerance.