News for hackers. Stuff that matters.
Re:Death to C by asveikau on Saturday May 02, 2015 @10:27AM (#9477175)
If you are a c leaning c++ hater, as I used to be, I would encourage you to look at some of the more recent techniques and standards in depth. Some examples I can probably not do justice towards in a short post: stl giving you inline-able data structures, functors (and now lambdas) giving you inline-able callbacks, raii for making C's "goto cleanup block" idiom more automatic, rvalue references getting rid of a lot of the unnecessary copies of "old" c++.

There are a lot of warts in the language and a lot of people in the community writing bad code. But there is a good language emerging, and plenty for low-level hackers to appreciate.

Re:Death to C by christianbryant on Saturday May 02, 2015 @10:34AM (#9477204)
As a hacker rather than programmer, I am pretty much stuck on the C train, so any distaste for C++ is reactionary and not borne of actual programming experience :-)

However, I have noted in my career that almost every package I regularly use and have to do something with at the build level is written in C (or Lisp). However, I do know of one project written in C++ that I respect and does great things, and that is GNU Octave.

Lambda expressions in the STL... Go figure!

Re:Death to C by asveikau on Saturday May 02, 2015 @12:18PM (#9477558)
I mean it when I say look into the topics in depth. Lambdas are done in a more machine code efficient way than anything else I have seen. It is basically just syntax for a functor, whose calls can be inlined right inside the callee.

Stl is similarly elegant from the narrow perspective of inlining, and getting rid of indirection that people tend to write when doing abstract data types in C. It took me a long time of hating C++ and preferring C before I was willing to see this. I still kind of prefer C but these days I am much more willing to concede that there are strengths in C++ that you can't easily match with equivalent C code.

Re:Death to C by christianbryant on Saturday May 02, 2015 @03:32PM (#9478245)
Even though I don't program for a living, I like experimenting with code, especially when tasked to build languages I haven't tried. I will look into these aspects of C++ - learning is a lifelong process :-)
Re:Death to C by DougMerritt on Saturday May 02, 2015 @01:22PM (#9477772)
> As a hacker rather than programmer, I am pretty much stuck on the C train, so any distaste for C++ is reactionary and not borne of actual programming experience

Please; "hacker" does not mean "inexperienced amateur", as you seem to imply it means here. The typical meaning is close to the opposite:

http://www.catb.org/jargon/html/H/hacker.html

As to C++, it has undeniable positives as well as undeniable negatives (according to plenty of experienced professionals).

Re:Death to C by christianbryant on Saturday May 02, 2015 @02:56PM (#9478108)
I wasn't implying that meaning in the slightest. Just establishing that I am not a trained programmer nor a computer scientist. Poorly composed turn of phrase, I guess.
Re:Death to C by DougMerritt on Saturday May 02, 2015 @07:44PM (#9479022)
And yet when I correct your terminology with a cited reference, I collect a couple of downvotes.

This is why it is unpleasant to correct objective errors on the internet.

Re:Death to C by christianbryant on Saturday May 02, 2015 @09:57PM (#9479454)
That's not right. In fact, I learned a great deal from this exchange, did some reading and referenced more folks who feel the same as you. Up vote from me - I appreciate it.
Re:Death to C by DougMerritt on Saturday May 02, 2015 @10:01PM (#9479461)
Glad you learned, and thank you.
Re:Death to C by asveikau on Tuesday May 05, 2015 @02:34PM (#9494102)
My experience with downvotes here is that all sorts of rational thought is unpopular with HN readers. They want you to be young, clueless, passive-aggressive and false-modest like them, and they are threatened when you are not displaying these traits. Take the downvotes as a badge of honor and don't get too caught up.