Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Please never, never, never ever write C/C++.

С - simple and stable, C++ - huge and changing. C - portable and easily parseable, C++ - unpredictable and unparseable. C - good, C++ - bad.



I hear good stories about D from colleagues:

http://digitalmars.com/d/2.0/overview.html


D's great for at least two reasons:

1) it set out to be a no-compromise systems programming language

2) it's being designed by people with an deep and intimate knowledge of C++ (Walter Bright wrote a C++ compiler - no mean feat, and Alexander Stepanov was Mr STL)

These guys know the good, the bad and the ugly of C++ much better than most. From the stuff I've seen so far (check out Stepanov's presentations on an iterator-free STL, or adding functional purity, and also look at the work on making floating point more rigorous) this could finally be a worthy successor.


3) You can declare functions to be pure. A lot of optimizations become possible.


Actually, my reason for writing "C/C++" was simply because they're the two languages I see targeted by articles like these. It wasn't to lump them together as one; it was like writing "Ruby/Python".


So, you don't use a C++ compiler for your C code?

The old C infrastructure is really outdated already -- you can use C and a very limited subset of C++ (without OO), and be perfectly happy.


No, I'm using GCC.

How's it outdated? Linux kernel is written in it.

As for limited subset, people would push and push the boundaries until your code grows fangs and horns




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: