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: 3, Insightful) by pe1rxq on Friday November 13 2015, @02:14PM

    by pe1rxq (844) on Friday November 13 2015, @02:14PM (#262638) Homepage

    I assume you never use bitwise operations or access real hardware with C?
    Doing those with signed integers or with extra large registers opens up a completly new can of worms.

    There is a very good reason for the existance of unsigned integers.

    Btw: Both example programs are a WTF on their own. If you write progams like this in the real world (and not just as examples on this site) I have some advise for you:
    Don't bother learning the integer promotion rules, you have worse problems anyway. Please use a language like rust or go, that way you will:
    - Make my life easier as I won't have to worry about encountering your C code in the future.
    - You will prove that rust and go are also not idiot proof

    Starting Score:    1  point
    Moderation   +1  
       Insightful=1, Total=1
    Extra 'Insightful' Modifier   0  
    Karma-Bonus Modifier   +1  

    Total Score:   3  
  • (Score: 2) by JoeMerchant on Friday November 13 2015, @09:52PM

    by JoeMerchant (3937) on Friday November 13 2015, @09:52PM (#262849)

    I'll grant you hardware registers as a special case, if the top bit is ever 1 that's a lot easier to deal with unsigned.

    But.... how often have you run into a slew of compiler warnings when working with legacy code that just went unsigned happy with quantities that are getting counted, or using unsigned int as a for loop control variable?

    --
    🌻🌻 [google.com]