TypeScript is surprisingly ok for compilers
TypeScript is an incredible language in general.<p>The fact that Functions are Objects that can have properties&#x2F;methods is supremely undervalued.<p>Are there other languages that do this so nicely? It&#x27;s the perfect blend of OO and functional.<p>Programming is mostly about gradually figuring out the right design I find. JS&#x2F;TS let&#x27;s me evolve things naturally without big rewrites.<p><pre><code>    function foo() {}
    function bar() {}
    function baz() {}
    const commands = [foo, bar, baz]
    &#x2F;&#x2F; Run commands
    commands.forEach(x =&gt; x())

    foo.help = &#x27;This does something&#x27;
    &#x2F;&#x2F; Describe commands
    commands.forEach(x =&gt; console.log(x.help))

    &#x2F;&#x2F; Add some state via closure.
    const config = {}
    function foo() { config.blah }

    &#x2F;&#x2F; Add some state using partials.
    function _foo(config) { config.blah }
    const foo = foo.bind(null, config)
</code></pre>
I can flexibly do what I need, without ever having to define a class like `Command`, which I probably don&#x27;t even know what it should be yet.<p>This premature naming of things in OO creates so many dramas.<p>It avoids things like `VideoCompressor#compress()`, `VideoSplitter#split()`. You don&#x27;t have to think: what state belongs in which class...you just call the function and pass it what it needs.