Why are systems languages always overly complex?
TypeScript abstracts away details that systems programming usually wants&#x2F;needs to precisely control.<p>For example, in TypeScript you don&#x27;t need to care whether a closure captures any variables or not, and whether these variables are primitive copyable values (like integers) or objects. It works all the same in TypeScript, but at the low level these are different cases, which can be implemented in different, incompatible ways with varying performance.<p>When a closure doesn&#x27;t capture anything, it can be simplified to a plain function pointer. If it captures some variables, it needs to carry the data context, and that requires a (pointer, data) pair that has a different representation in memory. If the data it carries can&#x27;t be trivially copied, then it also needs extra code inserted to keep this data allocated and freed at appropriate time.<p>TypeScript makes all these 3 cases invisible to you, so it needs no syntax for each of these, but it comes at a run-time cost (a closure may end up represented in its fattest, costliest representation, and you never get the faster&#x2F;leaner representation).<p>There&#x27;s a trope of a Sufficiently Smart Compiler that could in theory figure all these details out for you, and in this case see if your closures never use context, and use the cheaper pointer-only representation instead of always using a costlier object representation. The problem with this is that nobody has written a Sufficiently Smart Compiler yet. These smarts end up needing to analyze the whole program, which at very least is pretty slow to do, and in some cases is even provably impossible to do when program&#x27;s flow depends on run-time&#x2F;unknown values.<p>So the best solution we have is to offer more syntax to the programmer to say exactly what they want.