Stories
Slash Boxes
Comments

SoylentNews is people

posted by martyb on Friday November 13 2015, @10:24AM   Printer-friendly
from the Obfuscated-Rust-Competition-doesn't-sound-right dept.

In spite of my status and obvious bias as co-creator of D, I'll do my best to answer candidly; I follow Go and Rust, and I also definitely know where D's dirty laundry is. I'd encourage people with similar positions in the Rust and Go communities to share their honest opinion as well. So here goes.

First off, C++ needs to be somewhere in the question. Whether it's to be replaced alongside C, or be one of the candidates that's supposed to replace C, the C++ language is a key part of the equation. It's the closest language to C and the obvious step up from it. Given C++'s age, I'll assume in the following that the question also puts C++ alongside with C as a target for replacement.

Each language has a number of fundamental advantages (I call them "10x advantages" because they are qualitatively in a different league compared to at least certain baselines) and a number of challenges. The future of these languages, and their success in supplanting C, depends on how they can use their 10x advantages strategically, and how they overcome their challenges.

[Another way to look at this is to ask "What is wrong with C?" and then assess how well these languages solve those problems. -Ed.]


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 0) by Anonymous Coward on Friday November 13 2015, @04:46PM

    by Anonymous Coward on Friday November 13 2015, @04:46PM (#262734)

    Parent said: "Garbage collection doesn't prevent memory leaks. It prevents unreachable memory, but not all memory leaks are in the from of unreachable memory."

    The very definition of a memory leak is "unreachable memory". GC absolutely fixes that issue. You are complaining that GC doesn't fix logic errors in your program, and you are correct about that. It never claimed to do that.

    GC does relieve the programmer of a big burden (memory leaks), albeit at a cost. This frees the programmer to think more about those other logic errors you talk about.

  • (Score: 0) by Anonymous Coward on Friday November 13 2015, @07:32PM

    by Anonymous Coward on Friday November 13 2015, @07:32PM (#262800)

    Please do read up on definitions, prior to exposing your ingnorance to the wider world.

    • (Score: 0) by Anonymous Coward on Saturday November 14 2015, @12:26AM

      by Anonymous Coward on Saturday November 14 2015, @12:26AM (#262903)

      Alright, jackass, I will do just that. From https://en.m.wikipedia.org/wiki/Memory_leak [wikipedia.org] we get the definition:

      Memory Leak

      In computer science, a memory leak is a type of resource leak that occurs when a computer program incorrectly manages memory allocations[1] in such a way that memory which is no longer needed is not released.

      ---

      You insist on calling other types of resource leaks "memory leaks".

      I reread your post carefully and it appears that one of the code problems you are complaining about is that it can be hard to implement an object cache where you want the garbage collector to be free to collect the object in the cache without regard to the fact that the cache currently holds a reference to it. You are OK with that cached object disappearing and becoming a null reference at some point. Fortunately, Java added the WeakReference type later so you could easily implement the cache behavior I described with little effort on your part.

      Frankly, your comments make you sound like a programmer who knows just enough to be dangerous.

      • (Score: 0) by Anonymous Coward on Saturday November 14 2015, @01:08AM

        by Anonymous Coward on Saturday November 14 2015, @01:08AM (#262947)

        I noticed I wrote "your post" when making reference to a parent post written by a different (I hope) user. Replace that with "parent post" and the rest still stands.