Live data from Hacker News

Writing New System Software

borud.no

1–10 of 158 posts

Re: Writing New System Software

#6
I tend to disagree. (Modern) C++ is an incredibly powerful programming language. Contrary to some other languages it gives the developer maximal freedom and does not impose a particular way of doing things on the developer.

Re: Writing New System Software

#7
I think C++ is just fine. Memory management is not that hard anymore using smart pointers. I prefer that to java at any time of the night or day. Such an ugly verbose language. The buzz word laden stuff is actually quite bad. I have seen what could be rather simple systems be very unreliable and slow because of the many microservices all in their own container. Then if one is sensible enough to avoid that there is another pitfall. The cool kids like thread pools and having everything asynchronous. So a computation migrates between different threads many times between initiation and completion. I say instead: keep as much as possible single threaded and only offload expensive computations to thread(pool)s. That way one also does not need to lock the whole world, which, by the way, is far from free. Also, there are many situations where one can split computations in threads naturally as dictated by the problem one is trying to solve instead of dumping everything in a thread pool without considerations regarding what kind of queue system one implicitly creates. E.g., if one has N input channels and N is not too large one might have N threads for that.

Re: Writing New System Software

#8
post #7

I think C++ is just fine. Memory management is not that hard anymore using smart pointers. I prefer that to java at any time of the night or day. Such an ugly verbose language. The buzz word laden stuff is actually quite bad. I have seen what could be rather simple systems be very unreliable and slow because of the many microservices all in their own container. Then if one is sensible enough to avoid that there is an…

Smart pointers has some overhead though, even unique_ptr.

I like to use raii to handle normal pointers. For many programs memory leaks can just be handled by exit, too.

Re: Writing New System Software

#9
post #6

I tend to disagree. (Modern) C++ is an incredibly powerful programming language. Contrary to some other languages it gives the developer maximal freedom and does not impose a particular way of doing things on the developer.

In theory, yes. In practice few people use C++ fully, too often you find in-house "style-guides" vetoing specific things, such as Google's famous "no exceptions".

At the point you rule out using available facilities of the language you might as well use something else.

Re: Writing New System Software

#10
post #7

I think C++ is just fine. Memory management is not that hard anymore using smart pointers. I prefer that to java at any time of the night or day. Such an ugly verbose language. The buzz word laden stuff is actually quite bad. I have seen what could be rather simple systems be very unreliable and slow because of the many microservices all in their own container. Then if one is sensible enough to avoid that there is an…

Smart pointers has some overhead though, even unique_ptr. I like to use raii to handle normal pointers. For many programs memory leaks can just be handled by exit, too.

unique_ptr has zero overhead
Post reply on HN