2
<p><span class="h-card" translate="no"><a href="https://social.treehouse.systems/@mxshift" class="u-url mention">@<span>mxshift</span></a></span> <span class="h-card" translate="no"><a href="https://ioc.exchange/@azonenberg" class="u-url mention">@<span>azonenberg</span></a></span> no no, i&#39;m thinking of the thing which allows like</p><p>void f(char x[static 0x64]) {}</p>
<p><span class="h-card"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> <span class="h-card"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> What I really like is matching directly object or property types in the case statements. ex:</p><p>```python<br />match fruit_obj:<br /> case Apple(color=Red()):<br /> print(&quot;I&#39;m a red apple&quot;)<br /> case Apple():<br /> print(&quot;I&#39;m an apple&quot;)<br /> case Orange():<br /> print(&quot;I&#39;m an orange&quot;)<br /> case _:<br /> print(f&quot;Unknown fruit type: {type(fruit_obj)}&quot;)<br />```</p><p>P.S. match case statements were introduced in 3.10.</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> ugh modern python in my day we justed a dict for control flow</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> Nahh it&#39;ll work</p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@helge" class="u-url mention">@<span>helge</span></a></span> or Rust! yeah</p>
<p><span class="h-card" translate="no"><a href="https://tutut.delire.party/@simon" class="u-url mention">@<span>simon</span></a></span> actually no that won&#39;t work because you need lookahead</p>
<p><span class="h-card" translate="no"><a href="https://tutut.delire.party/@simon" class="u-url mention">@<span>simon</span></a></span> ... excellent idea</p>
<p>With so many in the media, business, and even the Democratic Party failing to understand this moment, it&#39;s more important than ever that grassroots groups like us are prepared to lead the fight against Trump. We rely on donors like you to power our nationwide organizing — please pitch in if you can. <a href="https://secure.actblue.com/donate/indivisible-action-1?refcode=mastodon20250420directpost&amp;source=mastodon" target="_blank" rel="nofollow noopener" translate="no"><span class="invisible">https://</span><span class="ellipsis">secure.actblue.com/donate/indi</span><span class="invisible">visible-action-1?refcode=mastodon20250420directpost&amp;source=mastodon</span></a></p>
<p><span class="h-card" translate="no"><a href="https://mastodon.social/@whitequark" class="u-url mention">@<span>whitequark</span></a></span> Looks like Swift, except in Swift, you rather link a 6MB big argument-parser lib that statically types out all the possible options 🙈<br />(but really, the `match` looks like how Swift&#39;s `switch` works)</p>