Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

D vs Zig vs Go for practical, pragmatic development of possibly-cross-platform tools? Fight.


I don't like any of those languages very much, but Zig seems perfectly fine for this sort of stuff. From the very beginning, I've seen people say that Zig should be used to offer easy, human-readable rewrites of basic C utilities without sacrificing execution speed. Meanwhile, I think Go would be much too heavy for a program like this, and D seems to be a little out of it's depths in this conversation.


I'm not sure if it's really a problem for ncdu use case, but in Golang all the file I/O operations consume threads (in contrast with network ones), so is not easy to parallelize them: https://github.com/golang/go/issues/6817

Btw, you forgot Rust :)


In Rust, it's easy: https://github.com/bootandy/dust/blob/master/src/dir_walker....

(Dust is "du + rust").


CLIs: For now, go. In 3 years? Zig.


Nim


Nim


Nim!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: