Hacker Newsnew | past | comments | ask | show | jobs | submit | yagni_dev's commentslogin

It's because borrow checker is very restrictive. Indices are a sanity escape!


You have no idea what tooling means in this context!


I'm willing to admit that is likely, could you enlighten me?

I've done professional c++ for a couple decades. My pipelines usually were conan with some dependencies that were not. The used clang tidy and format, san, cppcheck, coverity and tested release and debug builds with clang and gcc. Coverage was sometimes just clang. But sometimes gcc as well. Tests were usually google test. The team standard IDE was vscode.

Rust has rustfmt which is one standard. It has clippy which in addition to actual defects it forces commin idioms so code looks familiar. It has san and llvm coverage. It has miri. It supports aflop for fuzzing. And it has a single tool for package management and build. Edit: IDE is still vscode and it works great.

The only tooling missing for rust would be formal analysis, which is in work (and which isn't that great a story on c++ either) and gcc. A gcc front end is in work, and there is mrustc to generate c from rust, but yes, gcc front end support would be nice to get all those extra targets without the extra work.


the only astonishing thing is how pathetic rustafarians are. Whenever someone writes something positive about a c++ feature the squad is working extra time to diminish the article/opinion. You are trying so hard, lol.... "constexptr if" is brilliant, simplifies a lot template code.


"You only need to hire “software” DevOps, rather than people who neatly lay your cables, journey to DC to replace disks, etc, etc, etc."

Lol, what year you think we are? 1998? There are colo facilities around the world, you have 'remote hands' to take care everything related to hardware. You just need ansible/xyz to deploy you software, thats all it takes


The last time I have seen such an operation was back in 2009.

Also, even today you can buy a barebone place in the rack, with climate control and power supply. I know companies who do their disk replaces, cable management even in 2023.

I am fully aware you can have mostly managed data centre, like for example, Leaseweb, OVH, Servers.com. But if you have specialized hardware requirements, sometimes you have to wait a few days/weeks for installation.

I am old, but I don't think we are back in the 1998.


Customer is king indeed but why they expect/want to use latest boost if their infra is old? Use the latest version your infra supports, simple!


the fact we might have got sick of your evangelism and lies hasn't crossed your mind I guess

>It’s basically a compiler enforced set of C++ best practices

Its not, its a whole different programming paradigm where the compiler dictates how you write your software. You dont let your creative facilities to drive you or whats best for your domain - you just obey the language rules...


>But as more and more engineers joined us, some shortcomings of C++ came to bite us: unreadable coding style, memory leak, segmentation fault, and more.

- Seasoned devs but they never heard of clang tidy/format - Memory leaks on a new db codebase where each component should have clear ownership of data or pass to the next pipeline/stage - you dont even need smart poirters here, just a half decent design. - I am not even going to mention sanitizers, probably rocket science for them


Ownership is great! Which is why you should use a language that actually supports it, instead of one where it is just a semi-enforced convention.


In my experience, segfaults are often a result of using C libraries in C++. In the project I work on, OpenSSL integration supplies a constant trickle of segfaults (it's not my general area, I'm just witnessing those and report to whoever works on it).

This is especially true if you are trying to use those libraries in multi-threaded environment.


Segfaults happen, you run valgrind/asan/tsan etc. As long as the codebase is not horrendous its easy to fix. Third party packages complicate things, have to choose/use wisely/appropriately


In Rust they are really rare. Like vanishingly small numbers of them. C++ definitely. SegFaults happen. Sometimes they are even in prod. Rust not so much.


So far there isn't that much stuff written in Rust, so, any non-trivial Rust program will link with a bunch of non-Rust code. On the project I worked on, we had to link with SPDK for example (a rather big iSCSI server implementation).

C++ has been around for... what?.. 40 odd years? And any non-trivial project still links with C libraries.

I don't see this problem somehow going away in Rust w/o some revolutionary changes in operating systems, which is the major supplier of decrepit but unavoidable libraries you have to link with in order to get anything done.


From what I understood, clangd was not enough to make new developers write good enough code.

The problem was not the seasoned core of developers, but the fresh hires.

Now, this would be an interesting problem. Just as Python has PEP8 and some other programmable coding guidelines, we should have different sets of modern programmable C++ coding guidelines, which can be checked by clangd.

And I mean modern, logical, Rust challenging, C++20 coding guidelines. Something this particular team would follow. Nonsense like Orthodox C++ doesn't cut it.


A glance over their repo and pull request discussions discover everything but the "seasoned" devs, even more so 10+ of them.


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

Search: