‹ BackHN Continuity

Thread

What Zig felt like, coming from Rust

282 points · 351 comments · ksec

  1. Syzygies · · focus · HN ↗
    For various purposes I work on a language comparison project that includes C and candidate successors such as Go, Zig. One question is the language to use for an archival port of a 1980's computer algebra system written in 32-bit K&R C. While Zig is a great debugging compiler, it's not yet stable enough to be the best target language for archival purposes.

    <a href="https:&#x2F;&#x2F;github.com&#x2F;Syzygies&#x2F;Compare" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;Syzygies&#x2F;Compare

    So you&#x27;re in a restaurant where you don&#x27;t speak the language, you can&#x27;t read the menu, but you see three price points for set meals featuring the house specialty. (Say, &quot;Crossing the Bridge&quot; noodles in Yunnan.) Which do you choose? My tour guide, the author Fuchsia Dunlop, later agreed with me this is obvious: The middle choice.

    So you&#x27;re choosing between Go and C23 as candidate successors to K&amp;R C. They both have &quot;royal blood&quot;. One got the name. Knowing nothing more, which do you choose?

    The answer is equally obvious. The one that got the name also got the warts.

    1. pjmlp · · focus · HN ↗
      Despite my usual rants, naturally C23.

      Minimal rewrite due to the breaking changes introduced in C23 versus K&amp;R C, while the others are a complete rewrite.

      Even if the syntax is a bit of a kludge there are now ways to indicate bounds on function arguments.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.