Hacker News new | past | comments | ask | show | jobs | submit login

The C++ code, anyway, is remarkably prolix, probably 4-10x. It is probably best that they did not attempt Rust, under the circumstances.



From the blog post: > It would be relatively easy to start from the Go version and produce a Rust version, but I had to stop somewhere.

(I bet someone in hacker news is saying "challenge accepted!" and we'll have a xorfilter crate very soon)


Yes, I read that.

The point was that as bad as their C++ code is, their Rust version might be even more disappointing.

Downvoting me just for mentioning Rust only demonstrates immaturity.


(Author here) The project started by taking the cuckoo filter source code (which happens to be written in C++), and extend it. A lot of code comes from that conversion. Other implementations (Morton, CQF) are also written in C++. I write Java normally, so C++ code is not my strength, but C++ was needed to be able to compare with others. A Rust version would be nice!


I don’t have a ton of time but the Go version does seem very easy to port, we’ll see!


I downvoted you because wordy code isn't bad. "Prolix" is not a negative adjective when describing code. Golf is a game and not for real systems.


If you don't understand how having several times as much code as needed, reproducing features also provided by thoroughly-tested Standard libraries, creates reliability risks, this probably will not be the place you learn it. But you could try.

People promoting "safe" languages that don't support encapsulating powerful semantics in libraries prefer to downplay the risks in not having access to such libraries. Needing to open-code the same features, or rely on less well-encapsulated semantics is a fertile source of real-world bugs.

In the race to reliable systems, access to and use of sound, well-tested, usable libraries multiplies efforts.

Downvoting people because you don't understand their argument is disgraceful. Ask.




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

Search: