Zig Zen Update

(codeberg.org)

39 points | by tosh 1 hour ago

4 comments

  • mcherm 58 minutes ago
    Nicely done!

    I always felt that Python's "There should be one-- and preferably only one --obvious way to do it." was a bit of a mess.

    Obviously (to anyone who was around at the time), that plank was written in response to Perl's motto: "There is more than one way to do it."

    Zig's original take on this, "Only one obvious way to do things" seems even worse. You see, both languages agree that Perl had it wrong: it is unhelpful to have several different ways to write any future. But they went a little too far: it is not actually bad for it to be possible to write the same thing in more than one way.

    Zig's new phrasing: "There is an idiomatic way to do it." captures the CORRECT alternative to Perl's motto. It is not important that there be no alternative ways of writing something, Rather, it is important that there be a single idiomatic way to write it.

    • Fraterkes 42 minutes ago
      I think people criticize that line in the zen of Python because Python has now become very maximalist. On it's own merits, I think "There should be one obvious way to do it" is much better, less clunky, than "There is an idiomatic way to do it".

      Also, importantly, the Zen of Python is kinda written as a set of ideas that Python should aspire to ("there should be one obvious way to do it") instead of a sales pitch of Python's merits. I prefer that.

  • Validark 1 hour ago
    Glad to see "Together we serve the users" come back. I miss the old Zig readme that said Zig comes with an MIT license and a humble request to build software that serves the users.
    • JakobJK 59 minutes ago
      It was already there though.
  • rowbin 1 hour ago
    I'm out of the loop. Is there any context? Can't pick up on what really changed here.
    • dgellow 1 hour ago
      The link shows the exact diff
      • rowbin 56 minutes ago
        I saw what changed syntactically. I meant I don't really understand what changed semantically. And whether there is any context to why the change was necessary.
        • dgellow 41 minutes ago
          The commit message feels clear to me? It seems Andrew wanted to clean the zig zen slightly, it’s not a big change:

          > - rewordings

          > - "memory is a resource" goes without saying

          > - emphasize the final point

  • melon_tusk 26 minutes ago
    I don't see how Zig will ever contend with Odin, Jai, C3 and others when they drive away half of the prospective users with activism.
    • logicchains 9 minutes ago
      Still less activist than the Rust community; nobody's getting death threats for writing unsafe Zig.
    • dom96 20 minutes ago
      What activism is that?
      • kristoff_it 17 minutes ago
        trying to make good software :^)
        • quarkz14 10 minutes ago
          truly a tragedy! how dare you make good software!?!