Live data from Hacker News

Writing New System Software

borud.no

21–30 of 158 posts

Re: Writing New System Software

#21
> You may like STL, but that doesn’t change the fact that a huge number of companies have policies against using it.

Sources? I haven't heard of any company disallowing it, on the contrary, have heard of companies promoting its use.

edit: fixed formatting

Re: Writing New System Software

#22
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.

smart pointers is raii for normal pointers

Re: Writing New System Software

#23
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.

I don't think this is true. My experience hiring C++ developers does not confirm.

Re: Writing New System Software

#24
> Wait, what? Stateless systems are slower!?

Yes. They can be a lot slower, because they might still need whatever it is that state brings to the table (f'r instance, caching, or argument suites).

They often need to rebuild the state, each time, or make it someone else's problem.

I run into this with CRUD stuff, all the time. I’m not an FP programmer (they do great stateless stuff), so I am sure I could do better.

These days, I spend as little time as possible, in the backend.

Re: Writing New System Software

#25
Language preferences and safety features aside, I for one am 100% convinced that a/the upcoming language to rule "systems programming" (in a FOSS world with community participation) MUST have strong support for dynamic linking.

If you look at something like `apt-cache show podman | grep ^Built-Using:` (Output: https://paste.debian.net/plain/1225449) on Debian 11, you will see why. Imagine a few of those components shared between tens of packages, and security problems discovered im some. It's got to be any package maintainer's worst nightmare.

Re: Writing New System Software

#26

> You may like STL, but that doesn’t change the fact that a huge number of companies have policies against using it. Sources? I haven't heard of any company disallowing it, on the contrary, have heard of companies promoting its use. edit: fixed formatting

A lot of game companies don't use STL. I assume theremust be plenty of system software companies doing the same.

Re: Writing New System Software

#27

> You may like STL, but that doesn’t change the fact that a huge number of companies have policies against using it. Sources? I haven't heard of any company disallowing it, on the contrary, have heard of companies promoting its use. edit: fixed formatting

A lot of game companies don't use STL. I assume theremust be plenty of system software companies doing the same.

https://www.youtube.com/watch?v=6hC9IxqdDDw

anecdotally in the last ten years I haven't seen a single C++ codebase not using the stl, except arduino-level stuff

Re: Writing New System Software

#28
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.

> 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".

Almost never seen that in practice. I always see people talking about it in forums, but in real-world gigs I don't know people who artificially restrict their codebase with braindead rules like that.

Re: Writing New System Software

#29
post #5

"You can write reasonably fast software in almost any decent language (with a few exceptions)." - this is entirely wrong statement.

From what you wrote, it appears you don't know the meaning of "reasonably", "decent", "exception" and that you set your mind to disagreeing with the author before even fully comprehending the post.

Re: Writing New System Software

#30
post #5

"You can write reasonably fast software in almost any decent language (with a few exceptions)." - this is entirely wrong statement.

Ye I feel the author has no clue what he is talking about. "I can appreciate the “macho factor” of being able to write fast software in C or C++ (or even Objective-C), but most people aren’t going to be able to do that" I mean, C is probably the simplest tool to write fast software with, since there are so few hidden costs to know about. Like strdup does a malloc. What else? In C++ you have to know implementation det…

> I mean, C is probably the simplest tool to write fast software with

The simplicity is the hard part. Fishing for compliments by "pretending" it's so trivial to you shows immaturity.

The author definitely knows what he's talking about. Perhaps it's you who's doesn't?

Post reply on HN