News for hackers. Stuff that matters.
Re:How fast can you allocate a large block of memory in C++? by burfog on Thursday January 16, 2020 @03:19AM (#22062577)
Perhaps I can give you something weirder to read.

The other big complaint I have about C++ is that it is too high-level. It isn't very good for low-level control. :-)

Writing start-up code and linker scripts to support C++ code running without the libraries is not easy. All sorts of things, such as tables of constructors, need a solution. Typically that would involve a lot of assembly code. I'd need to disable lots of C++ functionality unless I wanted to write complicated things like a stack unwinder for exceptions.

It's just easier to use plain old C. The result is smaller too, which is important.

Re:How fast can you allocate a large block of memory in C++? by inetknght on Thursday January 16, 2020 @10:08AM (#22065156)
And someone said I was trolling hahaha
Re:How fast can you allocate a large block of memory in C++? by burfog on Thursday January 16, 2020 @10:26AM (#22065354)
It's weird feeling surrounded by web programmers who think Python and Javascript are the lowest you'd ever want to go.

C++ is annoyingly high-level if you are trying to write code to go in a flash chip. The code starts running at a specific address at soon as the CPU starts. There is no OS unless your code implements one. There is no C++ library unless you port one.

Re:How fast can you allocate a large block of memory in C++? by inetknght on Thursday January 16, 2020 @12:14PM (#22066550)
That's a fair point and it's a project I'd like to tackle someday in spare or paid time.

I don't think C++ is annoyingly high-level in that case: just annoyingly lacking in the ecosystem to support it.