<story><title>The end of &quot;Useless Ruby sugar&quot;: On intuitions and evolutions</title><url>https://zverok.substack.com/p/the-end-of-useless-ruby-sugar-on</url></story><parent_chain><item><author>matheusmoreira</author><text>&amp;gt; textual requires and module system could’ve been much cleaner&lt;p&gt;This irritated me a lot when I was a ruby programmer. Ruby&amp;#x27;s require is analogous to C&amp;#x27;s #include: modules are just files that get evaluated in order to add stuff to a global interpreter state.&lt;p&gt;It got to the point I went around asking people on IRC what they thought the perfect module system looked like. Studied long forgotten languages to see how they did it. To this day I&amp;#x27;m obsessed with this. I feel like it&amp;#x27;s one of those things you just &lt;i&gt;have&lt;/i&gt; to get right since day one because it&amp;#x27;s gonna be impossible to change it later.</text></item></parent_chain><comment><author>lloeki</author><text>It mostly comes from the intentional design of open classes, thus the namespace organisation is fundamentally decoupled from the filesystem: any Ruby file has to be able to contain any class&amp;#x2F;module, otherwise one can&amp;#x27;t add to an open class&amp;#x2F;module†!&lt;p&gt;There are a bunch of issues about this upstream about this, e.g: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;bugs.ruby-lang.org&amp;#x2F;issues&amp;#x2F;14982&quot; rel=&quot;nofollow&quot;&gt;https:&amp;#x2F;&amp;#x2F;bugs.ruby-lang.org&amp;#x2F;issues&amp;#x2F;14982&lt;/a&gt;&lt;p&gt;My exploratory take on it: &lt;a href=&quot;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;lloeki&amp;#x2F;package-ruby&quot;&gt;https:&amp;#x2F;&amp;#x2F;github.com&amp;#x2F;lloeki&amp;#x2F;package-ruby&lt;/a&gt;&lt;p&gt;I&amp;#x27;m currently drafting a proposal and planning to open another one, more focused on a specific aspect and a different angle, and thus with a couple of comparative PoCs that&amp;#x27;ll be a bit different from my above exploratory attempt.&lt;p&gt;† ... via `class` and `module` keywords, as one could always include&amp;#x2F;extend&amp;#x2F;prepend or use `module_eval`&amp;#x2F;`class_eval`&amp;#x2F;`instance_eval`.</text></comment>
<story><title>The end of &quot;Useless Ruby sugar&quot;: On intuitions and evolutions</title><url>https://zverok.substack.com/p/the-end-of-useless-ruby-sugar-on</url></story><parent_chain><item><author>matheusmoreira</author><text>&amp;gt; textual requires and module system could’ve been much cleaner&lt;p&gt;This irritated me a lot when I was a ruby programmer. Ruby&amp;#x27;s require is analogous to C&amp;#x27;s #include: modules are just files that get evaluated in order to add stuff to a global interpreter state.&lt;p&gt;It got to the point I went around asking people on IRC what they thought the perfect module system looked like. Studied long forgotten languages to see how they did it. To this day I&amp;#x27;m obsessed with this. I feel like it&amp;#x27;s one of those things you just &lt;i&gt;have&lt;/i&gt; to get right since day one because it&amp;#x27;s gonna be impossible to change it later.</text></item></parent_chain><comment><author>dexwiz</author><text>JavaScript’s modules only changed because the toolchain rapidly iterated several times over the course of a decade. Most languages don’t see this kind of churn. Even then the migration is at best partial.</text></comment>