Reply to post: Re: Sun was always a little arrogant about Java

Oracle crushed in defeat as Java world votes 'No' to modular overhaul

bazza Silver badge

Re: Sun was always a little arrogant about Java

I'll bite :)

"If it did not exist we would still have to use archaic rubbish like C++"

Oi, stop dissing C++!

Ok, so there's a decades long history behind C++ that has not been removed, some of the template and stl stuff is 'orrible. However if one makes careful and disciplined use of shared pointers and runs it on top of a memory allocator like GLIBC's ptmalloc, it's pretty hard to beat.

I've written really quite large programmes in C++ that don't use the "delete" keyword anywhere at all and have zero memory leaks (according to valgrind), everything is done with shared pointers. And it's fast.

One of my favourites blends stl queues with ZeroMQ, it pushes shared pointers through the stl queue but uses ZMQ for it's distribution patterns (PUSH/PULL in this case) to decide which thread is going to read the shared pointer off the queue. Hmmm, I think I can hear people curling up in horror...

Personally speaking though I think the days of C++ are passing. Rust in particular stands a very good chance indeed of replacing it. Being a completely new language means they can throw away all the decades of cruftiness that a language like C++ has to support, and build a nice language with some very high level ideas (things like automatic memory management) without the need for a bloaty horrible thing like a garbage collector thread. There's even rumblings of a project to re-write Linux in Rust!

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon