14 comments

  • santiagobasulto2 hours ago
    This is awful. I love type correctness, but going all the way to flag PORT=8080? There should be a basic level of type inference.<p>Especially for “typed” languages that have done typing very wrong, as Python or Typescript.
    • jlnthws25 minutes ago
      I agree. This looks like a dogmatic types-everywhere, unpythonesque limitation. Add type inference and I’ll buy it.
    • IceDane2 hours ago
      Can you elaborate how those languages have &quot;done typing very wrong&quot;?
  • gavmor5 hours ago
    Gawain, the finest night alive (literally <i>Þe most kydde knyȝtez vnder Krystes seluen</i>) committed one indisputable, albeit minor, transgression under a regime of unsparing precision.<p>&gt; <i>ȝe han redily rehersed, bi resoun ful trwe, Alle þe covenauntz þat I yow kende...</i><p>(&quot;You have readily recapitulated, by fully accurate accounting, all covenants that I declared.&quot;)<p>I can&#x27;t think of a <i>more</i> fitting name except, perhaps, the speaker of these lines: the exacting Lord Bertilak.
    • thaumasiotes38 minutes ago
      &gt; the finest [k]night alive (literally <i>Þe most kydde knyȝtez vnder Krystes seluen</i>)<p>Some scattered thoughts:<p>- As far as I can tell <i>kyðde</i> means &quot;known&quot; and is only indirectly a statement about his quality as a knight. You can be the most famous without being the best.<p>- <i>Resoun</i> [&quot;reason&quot;] does means &#x27;accounting&#x27;, but as in &#x27;give an account of what happened&#x27;, not in the modern sense of &quot;financial figures&quot;. I have difficulty understanding your translation for that reason.<p>- I&#x27;m curious why there&#x27;s a &#x27;v&#x27; in &quot;covenauntz&quot; when &quot;seluen&quot; is spelled with a &#x27;u&#x27;, or, for that matter, when &quot;vnder&quot; is spelled with a &#x27;v&#x27;.<p>- Tolkien (as seen on wikisource) and Richard Morris (Project Gutenberg) have <i>And þou hatȝ redily rehersed, bi resoun ful trwe &#x2F; Clanly al þe couenaunt þat I þe kynge asked</i>. (This solves the problem of why there would be a &#x27;v&#x27; in <i>covenaunt</i>...) This seems to acknowledge that Gawain has accurately repeated the terms of <i>the single covenant that the Green Knight has declared to Arthur</i> (&quot;let one of your men take up my guisarme and deal me any blow, and I will return the same blow twelve months hence&quot;), not a list of every agreement he&#x27;s ever made with anyone. I&#x27;m a little surprised by <i>þat I yow kende</i>; as far as I was aware, the Green Knight made his declaration to the court in general and had no idea that the person taking him up on it would be Gawain.<p>- Does Lancelot exist in the source you&#x27;re quoting from? The Knight of the Cart seems to predate Gawain and the Green Knight by a couple of centuries.<p>(While looking into some of these questions, I found the following project:<p><a href="https:&#x2F;&#x2F;digitalcollections.ucalgary.ca&#x2F;Browse&#x2F;Collections&#x2F;Gawain-Manuscript&#x2F;" rel="nofollow">https:&#x2F;&#x2F;digitalcollections.ucalgary.ca&#x2F;Browse&#x2F;Collections&#x2F;Ga...</a><p><a href="https:&#x2F;&#x2F;wpsites.ucalgary.ca&#x2F;gawain-ms&#x2F;wp-content&#x2F;uploads&#x2F;sites&#x2F;146&#x2F;2024&#x2F;01&#x2F;SGGK-final.pdf" rel="nofollow">https:&#x2F;&#x2F;wpsites.ucalgary.ca&#x2F;gawain-ms&#x2F;wp-content&#x2F;uploads&#x2F;sit...</a><p><a href="https:&#x2F;&#x2F;wpsites.ucalgary.ca&#x2F;gawain-ms&#x2F;wp-content&#x2F;uploads&#x2F;sites&#x2F;146&#x2F;2024&#x2F;01&#x2F;General-Introduction.pdf" rel="nofollow">https:&#x2F;&#x2F;wpsites.ucalgary.ca&#x2F;gawain-ms&#x2F;wp-content&#x2F;uploads&#x2F;sit...</a><p>which I&#x27;m linking here in case other people find it interesting, and also in case this makes it easier for me to find it again myself one day.)
    • bustermellotron4 hours ago
      &gt; &quot;You have readily recapitulated, by fully accurate accounting, all covenants that I declared.&quot;<p>This should be in the README.
  • orsorna4 hours ago
    This is cool. And I appreciate the cheeky comment about not using this program if your IDE or whatever does type checking already :)<p>But honestly, after I realized I appreciate types being enforced, I started writing in different languages. I rarely return to Python unless I&#x27;m scripting something that doesn&#x27;t require longevity.
    • nekgrim3 hours ago
      What languages are you using ?
  • michalc3 hours ago
    I think similar to `dict[str, Any]`, my (justified?) recent pet peeve is `| None`.<p>I posted this yesterday pretty much on that: <a href="https:&#x2F;&#x2F;charemza.name&#x2F;blog&#x2F;posts&#x2F;software&#x2F;type-safety&#x2F;type-safety-is-a-double-edged-sword&#x2F;" rel="nofollow">https:&#x2F;&#x2F;charemza.name&#x2F;blog&#x2F;posts&#x2F;software&#x2F;type-safety&#x2F;type-s...</a>
    • disgruntledphd22 hours ago
      Yeah, that always stinks of types look nice, but I can&#x27;t be bothered to try a little harder.
      • stephantul1 hour ago
        What do you think it should be? I use | None a lot and it doesn’t seem like a smell to me
        • disgruntledphd240 minutes ago
          i feel like you probably just shouldn&#x27;t return None, as it causes issues when tracing problems through the system.<p>If you must return None somewhere, I&#x27;d really prefer it to happen in one place (so the top level function may return None if something weird happens, but all the individual functions return a value).<p>But to be fair, this is probably just trauma from tracking down weird sentinel values.
  • Garlef5 hours ago
    Maybe not for me but I love the attitude.<p>(And actually, my personal objection is incidental: The python syntax is not pretty to begin with and the situation does not improve with even more visual verbosity)
    • skeledrew4 hours ago
      &gt; The python syntax is not pretty to begin<p>That&#x27;s an interesting objection, given Python is the closest programming language to English. Understandable if your native language isn&#x27;t English, but really strange otherwise IMO.
      • stackghost3 hours ago
        Semantic indentation is fundamentally an insane design. And I don&#x27;t mean &quot;insane&quot; as a colloquialism for &quot;dumb&quot;. I mean it is literally not a sane choice to make.<p>English would make a horrid programming language, so being close to it is not a plus.
        • somat7 minutes ago
          I think it makes a lot of sense.<p>Nearly everybody agrees that a neat formatting style is better and more readable than a messy inconsistent one. So while designing a programing language intended to be highly readable we jump two steps ahead. mandatory linting, make the neat format part of the syntax, remove the parts of the syntax now superfluous due to the mandatory neat format, and you have python.
        • throw-qqqqq49 minutes ago
          &gt; Semantic indentation is fundamentally an insane design<p>That is a common complaint against Python, and tbh it also made me uneasy at first.<p>But honest question: Do you write any Python yourself?<p>I ask because I’ve only heard this objection from people who do not write Python at all.<p>IME, people soften up on it after some use. I find that this is the case for many (visual) aspects of syntax.
        • teiferer2 hours ago
          In the age of auto-formatters, I have less and less sympathy for this point of view.<p>Any widely used formatter indents along semantics anyway, so why clutter your code with curly braces everywhere if stucture is clear from indentation? Might as well make it semantic.<p>Before auto-formatters, there was the occasional case where you could argue that some quick hack made something more readable, at the expense of less consistency and wasted time arguing about this in code reviews. But that ship has sailed, arguably rightfully so.<p>And that doesn&#x27;t even bring the LLM angle. If code is generated by a machine anyway and you just review it, if even that, why <i>still</i> bash indentation as a semantic construct?
          • stackghost2 hours ago
            If you have to run your source code through a formatter to make sure it doesn’t have mixed tabs and spaces that is not the flex you seem to think it is.<p>If you’re going to just have an LLM write all the code anyway why bother with a slow janky mess like python at all? Just make it write rust or java or go or literally anything.<p>Imagine having a magical machine that can write code in any programming language ever conceived, and you ask it to pick the language whose community thinks virtualenvs are a reasonable solution as opposed to a mark of profound shame. Couldn’t be me.
            • 7bit30 minutes ago
              [dead]
        • UltraSane1 hour ago
          Considering the endless arguments over C syntax I really don&#x27;t see what is so weird about Python indentation. It has the nice effect of making code look a lot more consistent.
        • 7bit32 minutes ago
          [dead]
      • lefra1 hour ago
        Python code using advanced features of the language (see for example [1]) look as much like line noise as C++ template metaprogramming. If &quot;close to the english language&quot; is your criterion, I believe COBOL should rank higher than python:<p>ADD transaction-balance TO total-balance.<p>Is readable to a layman whereas this isn’t:<p>total-balance += transaction-balance<p>Or even worse for someone who learned algebra but not programming (this looks like an equation, and transaction-balance is therefore equal to zero):<p>total-balance = total-balance + transaction-balance<p>[1] <a href="https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;6760685&#x2F;what-is-the-best-way-of-implementing-a-singleton-in-python" rel="nofollow">https:&#x2F;&#x2F;stackoverflow.com&#x2F;questions&#x2F;6760685&#x2F;what-is-the-best...</a>
  • __mharrison__5 hours ago
    Be cool to have a strict Python that actually runs fast with types...
    • analog_daddy5 hours ago
      Maybe mypyc? <a href="https:&#x2F;&#x2F;github.com&#x2F;mypyc&#x2F;mypyc" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mypyc&#x2F;mypyc</a><p>To be honest, I never tried it personally, but I try to check up on its status every couple of months.
      • woadwarrior011 hour ago
        There&#x27;s also shedskin.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;shedskin&#x2F;shedskin" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;shedskin&#x2F;shedskin</a>
    • stackghost3 hours ago
      &gt;a strict Python that actually runs fast with types...<p>Isn&#x27;t that just C with extra steps
  • pmg10134 minutes ago
    I wish the people spearheading the charge to integrate static typing into Python has borne in mind the old aphorism about not being able to make an octopus by nailing legs to a dog.<p>Python is a great dynamic language. There are many great statically typed languages. Why does every great dog have to become a half-assed octopus?
  • isaachinman4 hours ago
    Maybe just... Stop writing py?
  • rbnafo3 hours ago
    Python 9.x release notes: we are a statically typed language now.
  • cadamsdotcom4 hours ago
    Yes! Exactly what a long term codebase needs.<p>May as well be strict, right! We have the technology.<p>Agents will fix lint issues same as any other kind of error. So lint in a blocking pre-commit hook. End result: 100% strongly typed agent written code, at least one kind of slop gone.
  • blunt_read5 hours ago
    [flagged]
  • mesm79034 hours ago
    [flagged]
  • jheriko4 hours ago
    [dead]