<story><title>Proposal: JavaScript Structs</title><url>https://github.com/tc39/proposal-structs</url></story><parent_chain><item><author>afavour</author><text>I think in this specific case it&amp;#x27;s JavaScript&amp;#x27;s requirement for backwards compatibility that bloats it... but there&amp;#x27;s a lot you can ignore. Like, you can declare a variable with var, let or const but there&amp;#x27;s absolutely no reason to use var any more. I feel similarly about the proposals to introduce records and tuples: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tc39&amp;#x2F;proposal-record-tuple&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tc39&amp;#x2F;proposal-record-tuple&lt;/a&gt;... in most scenarios you&amp;#x27;ll probably be better off using records rather than objects, and maybe that&amp;#x27;s what folks will end up doing.&lt;p&gt;But boy does it all get confusing.&lt;p&gt;&amp;gt; Now, Typescript is on version 5.6 and there is so much stuff you can do with it that it&amp;#x27;s overwhelming. And nobody uses most of it!&lt;p&gt;I&amp;#x27;m not so sure about that. I think we end up &lt;i&gt;consuming&lt;/i&gt; a lot of these features in the TS types that get published alongside libraries. We just don&amp;#x27;t know it, we just get surprisingly intuitive type interfaces.</text></item><item><author>leetharris</author><text>I am not sure how to really refine this thought I have had, but I have this fear that every language eventually gets so bloated and complicated that it has a huge barrier to entry.&lt;p&gt;The ones that stand out the most to me are C# and Typescript.&lt;p&gt;Microsoft has a large team dedicated towards improving these languages constantly and instead of exclusively focusing on making them easier to use or more performant, they are constantly adding features. After all, it is their job. They are incentivized to keep making it more complex.&lt;p&gt;The first time I ever used C# was probably version 5? Maybe? We&amp;#x27;re on version 12 now and there&amp;#x27;s so much stuff in there that sometimes modern C# code from experts looks unreadable to me.&lt;p&gt;One of the reasons I have so much fun working in node&amp;#x2F;Javascript these days is because it is simple and not much has changed in express&amp;#x2F;node&amp;#x2F;etc for a long time. If I need an iterable that I can simply move through, I just do `let items = [];`. It is so easy and hasn&amp;#x27;t changed for so many years. I worry that we eventually come out with a dozen ways to do an array and modern code becomes much more challenging to read.&lt;p&gt;When Typescript first came out, it was great. Types in Javascript are something we&amp;#x27;ve always wanted. Now, Typescript is on version 5.6 and there is so much stuff you can do with it that it&amp;#x27;s overwhelming. And nobody uses most of it!&lt;p&gt;This is probably just old man ranting, but I think there&amp;#x27;s something there. The old version I used to debate about was C vs C++. Now look at modern C++, it&amp;#x27;s crazy powerful but so jam packed that many people have just gone back to C.</text></item></parent_chain><comment><author>dunham</author><text>&amp;gt; there&amp;#x27;s absolutely no reason to use var any more.&lt;p&gt;So I also thought.  And then I recently learned that typescript uses `var` internally for performance.&lt;p&gt;From src&amp;#x2F;compiler&amp;#x2F;checker.ts:&lt;p&gt;&lt;pre&gt;&lt;code&gt;    &amp;#x2F;&amp;#x2F; Why var? It avoids TDZ checks in the runtime which can be costly.
    &amp;#x2F;&amp;#x2F; See: https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;microsoft&amp;#x2F;TypeScript&amp;#x2F;issues&amp;#x2F;52924
    &amp;#x2F;* eslint-disable no-var *&amp;#x2F;
    var deferredDiagnosticsCallbacks: (() =&amp;gt; void)[] = [];&lt;/code&gt;&lt;/pre&gt;</text></comment>
<story><title>Proposal: JavaScript Structs</title><url>https://github.com/tc39/proposal-structs</url></story><parent_chain><item><author>afavour</author><text>I think in this specific case it&amp;#x27;s JavaScript&amp;#x27;s requirement for backwards compatibility that bloats it... but there&amp;#x27;s a lot you can ignore. Like, you can declare a variable with var, let or const but there&amp;#x27;s absolutely no reason to use var any more. I feel similarly about the proposals to introduce records and tuples: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tc39&amp;#x2F;proposal-record-tuple&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;tc39&amp;#x2F;proposal-record-tuple&lt;/a&gt;... in most scenarios you&amp;#x27;ll probably be better off using records rather than objects, and maybe that&amp;#x27;s what folks will end up doing.&lt;p&gt;But boy does it all get confusing.&lt;p&gt;&amp;gt; Now, Typescript is on version 5.6 and there is so much stuff you can do with it that it&amp;#x27;s overwhelming. And nobody uses most of it!&lt;p&gt;I&amp;#x27;m not so sure about that. I think we end up &lt;i&gt;consuming&lt;/i&gt; a lot of these features in the TS types that get published alongside libraries. We just don&amp;#x27;t know it, we just get surprisingly intuitive type interfaces.</text></item><item><author>leetharris</author><text>I am not sure how to really refine this thought I have had, but I have this fear that every language eventually gets so bloated and complicated that it has a huge barrier to entry.&lt;p&gt;The ones that stand out the most to me are C# and Typescript.&lt;p&gt;Microsoft has a large team dedicated towards improving these languages constantly and instead of exclusively focusing on making them easier to use or more performant, they are constantly adding features. After all, it is their job. They are incentivized to keep making it more complex.&lt;p&gt;The first time I ever used C# was probably version 5? Maybe? We&amp;#x27;re on version 12 now and there&amp;#x27;s so much stuff in there that sometimes modern C# code from experts looks unreadable to me.&lt;p&gt;One of the reasons I have so much fun working in node&amp;#x2F;Javascript these days is because it is simple and not much has changed in express&amp;#x2F;node&amp;#x2F;etc for a long time. If I need an iterable that I can simply move through, I just do `let items = [];`. It is so easy and hasn&amp;#x27;t changed for so many years. I worry that we eventually come out with a dozen ways to do an array and modern code becomes much more challenging to read.&lt;p&gt;When Typescript first came out, it was great. Types in Javascript are something we&amp;#x27;ve always wanted. Now, Typescript is on version 5.6 and there is so much stuff you can do with it that it&amp;#x27;s overwhelming. And nobody uses most of it!&lt;p&gt;This is probably just old man ranting, but I think there&amp;#x27;s something there. The old version I used to debate about was C vs C++. Now look at modern C++, it&amp;#x27;s crazy powerful but so jam packed that many people have just gone back to C.</text></item></parent_chain><comment><author>hinkley</author><text>When they made class declarations imply strict, I thought that was a pretty wise move. But it might have been good if they applied more limitations than that, made them super-strict.&lt;p&gt;Such as for instance making &amp;#x27;var&amp;#x27; not work in class declarations.</text></comment>