4 ms·
We do use classes in the test harness, services layer, and to polyfill es6 Map. We just don't use them in the design of any compiler subsystems.
by wwwigham 9y ago
We do use classes in the test harness, services layer, and to polyfill es6 Map. We just don't use them in the design of any compiler subsystems.
- chamakits 9y agoThis is very interesting to me. Is the reasoning behind this documented anywhere? I could only find instructions the coding guideline indicating as much (here: https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines#classes https://github.com/Microsoft/TypeScript/wiki/Coding-guidelin...) but couldn't find why. I'd love to know why, may better inform my usage of typescript.
- roadtestman 9y agobring a horse to water ... but cant make it drink you have all the answers in front of you do you need them to read the code for you? Come on man. A little effort please. Its not like you have been neglected with info.
- vdnkh 9y agoFor better or worse? I've avoided classes in our codebase because I don't like the lack of privates via closure (revealing module pattern) and it's transpiler overhead, but it's a very powerful organization tool. I've found code to be much neater in the class format.
- sillysaurus3 9y agoLooks like C++ circa 2008. Careful with those abstractions. That seems a stone's throw away from template metaprogramming.