‹ BackHN Continuity

Thread

Platform-independent SIMD in Go

414 points · 152 comments · yurivish

  1. u8 · · focus · HN ↗
    This is why I love Go. Nobody was asking for this, but they took the time to do it right and continue to Push go as a memory safe, high-level systems language.
    1. OutOfHere · · focus · HN ↗
      (removed)
      1. shikck200 · · focus · HN ↗
        You can write unsafe code in Go (import unsafe), but then, you can do the same in Rust. Unsafe code is not the default, and in day to day Go i rarely see the use of the unsafe package.
        1. iambvk · · focus · HN ↗
          What he probably means is data-races in go can result in memory/type unsafe accesses -- I suspect, likely due to slice types -- not sure if that is true/false.
          1. shikck200 · · focus · HN ↗
            Sure, but a data race is, IMHO not the same as memory safety. A data race, can be 100% memory safe, but just cause a logic bug in some program. I often see people mixing memory safety with racing. Go has bounds checks so you end up with a panic either way. Not UB.

            As an (outside go) example, Ocaml (5) promises strong memory safety, but not to be data race free. A data race is not something we can prevent, because its usually not bound by code, but by time and the race-source rarely in source-code.

            This means we have data races in http, database inserts etc. The source is usually not a concurrent task in source code-land.

            1. tuveson · · focus · HN ↗
              Russ Cox points out that races are the one place in Go besides unsafe where Go lacks memory safety: <a href="https:&#x2F;&#x2F;research.swtch.com&#x2F;gorace" rel="nofollow">https:&#x2F;&#x2F;research.swtch.com&#x2F;gorace

              I do think the nitpicking about this is mostly from people that want to say “my favorite language is safer than Go” which stupid and annoying.

Open on Hacker News to reply ↗

Unofficial Hacker News client; not affiliated with Y Combinator.