Hacker News

Top stories

Live mirror
30 storiesupdated just nowView source snapshot
  1. Bend 2 and the Vibe-Coding Trap(liampwll.com ↗)
    5comments
  2. OpenJev(openjev.com ↗)
    111comments
  3. ZCode, the GLM coding agent, silently uploads your Git history(tokenstead.ai ↗)
    17comments
  4. I don't like passkeys(hawksley.dev ↗)
    discuss
  5. Jemalloc 5.4.0(github.com/jemalloc ↗)
    54comments
  6. Microsoft exec called AI scraping 'the largest theft of labor in human history'(techcrunch.com ↗)
    230comments
  7. Cekura (YC F24) Is Hiring(ycombinator.com ↗)
    discuss
  8. The scourge of x86 emulation(fex-emu.com ↗)
    37comments
  9. Astra for Law(openai.com ↗)
    604comments
  10. Bonsai 2 27B: Near-Lossless Compression in a 9x Smaller Footprint(prismml.com ↗)
    145comments
  11. Replacing Pull Requests with Delta(zed.dev ↗)
    18comments
  12. Subnormal floating-point numbers are expensive on Intel processors(lemire.me ↗)
    3comments
  13. Bend – A language that blocks AI mistakes via proof, on CPU and GPU(bend-lang.com ↗)
    238comments
  14. Qwen 3.8 Omni Flash(qwen.ai ↗)
    90comments
  15. Warren Buffett Steps Down as Berkshire Chairman, Names Son to Replace Him(nytimes.com ↗)
    19comments
  16. Hister: A private search engine for the pages you visit and the files you keep(github.com/asciimoo ↗)
    173comments
  17. Wax motor(wikipedia.org ↗)
    76comments
  18. When the fractional part of a float fixes your shader(crocidb.com ↗)
    8comments
  19. Fujitsu launches made-in-Japan next-generation CPU FUJITSU-MONAKA(global.fujitsu ↗)
    236comments
  20. Pre-Greek: The lost language hidden within Ancient Greek(linguisticdiscovery.com ↗)
    44comments
  21. Dr Julius Neubronner's Miniature Pigeon Camera(publicdomainreview.org ↗)
    discuss
  22. How to Write with an LLM(sockpuppet.org ↗)
    132comments
  23. A heap overflow and SSO misconfiguration to compromise OpenAI internal repos(hacktron.ai ↗)
    161comments
  24. Shapelearn Qwen 3.8 27B (13.1 GB VRAM)(byteshape.com ↗)
    17comments
  25. Ask A Monk – A digital wilderness for thoughts with no immediate answer(askamonk.online ↗)
    27comments
  26. Flet 1.0 – Build cross-platform apps in Python(flet.dev ↗)
    69comments
  27. Telstra outage: The night a network decided the year was 2006(netnod.se ↗)
    29comments
  28. Diplodocus, Long Thought Exclusively American, Turns Up in Spain(sci.news ↗)
    45comments
  29. Speeding up gearhash on ARM64(sam.dev ↗)
    discuss
  30. Why I didn’t sign the Fields medallists’ letter(gowers.wordpress.com ↗)
    376comments

How Safe Is Zig?

9 pointsby 5y agoscattered-thoughts.net
1 comments
5y agoHN ↗

If one looks only at the comparison table from the article, one gets the impression that Zig is better than C only by implementing runtime checks. Runtime checks are a cheap trick on the road to safety. Dynamic languages do so all the time. That would mean there are no real language level advances when compared to C.

I would say Zig is much safer than the article leads on. That would be because of the impact of the design of the language itself. Zig has many language level improvements that reduce code fragility (a major source of bugs), lessen runtime code complexity, improve ergonomics and reinforce good design. Zig is definitely on the other side of the spectrum than C in that regard.

Zig has for example has a modern type system (incl. nullable types), namespaces, block expressions, structured error-handling, generics through compile time execution, and a defer statement.

C instead has things like the preprocessor, .h and .h combo's, a fragile build system and in general high quality duct tape engineering.