‹ BackHN Continuity

Thread

What Zig felt like, coming from Rust

282 points · 351 comments · ksec

  1. Panzerschrek · · focus · HN ↗
    > Rust: Drop runs automatically at scope end, so this specific bug simply doesn’t exist.

    That's why having no auto-destructors is a dead-end. This is the greatest mistake of such languages like Zig or Odin.

    1. dnautics · · focus · HN ↗
      You can statically analyze for leaks.
      1. IshKebab · · focus · HN ↗
        I doubt that. I mean I'm sure it can catch some cases, but if it worked reliably it would just be a language feature.
        1. dnautics · · focus · HN ↗
          Maybe the authors just don't want to do it?

          Anyways: its possible, I am building it as a very side project.

          github.com/ityonemo/clr

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.