3 ms·
It seems it might be an issue with their development abilities or problem-solving motivation: 1. It seems that they write a ".d.ts" file manually in addition t
by devit 6y ago
It seems it might be an issue with their development abilities or problem-solving motivation:
1. It seems that they write a ".d.ts" file manually in addition to using TypeScript for the code. This is dumb, since TypeScript generates the declarations automatically. However, for them "it was too much overhead and complexity when we attempted it before", which caused them to give up, a very dubious course of action.
2. They claim that changes take minutes to recompile, but TypeScript can compile incrementally, so this shouldn't happen assuming they are organizing their code properly. Also, you can just translate without type checking, which is no worse than using JavaScript instead.
3. They claim that "having two Body classes is obviously wrong" (?!). Of course having two classes with the same name in different namespaces/packages is perfectly fine in properly designed languages (including both JavaScript and TypeScript). Their "Header" shadowing problem also might be due to a lack of understanding of namespaces.
4. They seem to conflate JavaScript vs TypeScript with single file vs multiple files. Of course you can have a single TypeScript file or you can have multiple JavaScript files and bundle them with any JS bundler or just concatenate them.
Given that their codebase seems to be complex according to their compile time claims and that they don't seem particularly skilled given their claims, using a type-deficient language will most likely result in software full of bugs.
- untog 6y agoI’m never one for developer hero worship, but I feel safe assuming that Ryan Dahl’s development abilities are not the issue here.
- war1025 6y ago> 2. They claim that changes take minutes to recompile, but TypeScript can compile incrementally, so this shouldn't happen assuming they are organizing their code properly. Also, you can just translate without type checking, which is no worse than using JavaScript instead. Interested to know how you're actually supposed to do this. I don't do much web development, but the few times I've had to dive into our typescript code at work, I end up just modifying the compiled javascript to debug things because the compile loop is painfully slow.
- Kaze404 6y agoIt's a relatively new thing https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-4.html#faster-subsequent-builds-with-the---incremental-flag https://www.typescriptlang.org/docs/handbook/release-notes/t...
- TOGoS 6y agoWith regard to point 1, I think the reasoning is that they wanted precise control over their .d.ts file, since that's the public interface. This I understand, though I don't see why switching to JavaScript necessarily helps. Maybe it was tricky to get the TypeScript compiler to accept their hand-written .d.ts while also processing TypeScript? Which sounds more like a tooling problem than a language problem. I'm with you on the rest of the points, though. I don't quite understand it, either. But then I'm not working in that codebase every day. Easy to criticize people from the outside!
- inimino 6y agoThank goodness the noobs that brought us Node.js have you, random HN commenter, to explain CS 102: Intro to Software Engineering to them. Have you considered that the people making this decision might just possibly have more relevant experience than you do?