News for hackers. Stuff that matters.
Re:New school C by null_ptr on Wednesday December 26, 2012 @11:06AM (#4969668)
C is still my favourite language of its style, and so far I also worked on C++, C#, Java, and Python projects. None other is as simple and direct.

Looking at the book's TOC it looks like there's a bunch of interesting ideas in there, I'm tempted to pick it up.

Re:New school C by jlarocco on Wednesday December 26, 2012 @12:46PM (#4970070)
FWIW, some of the advice in the book is pretty bad. The most unbelievable is to ignore memory leaks under 100Kb, but there are a lot of other examples.

The first half of the book covers Git, autotools, Makefiles, and random topics tangentially related to C. If you're unfamiliar with those, it's an okay introduction to them, but there's some dubious advice in those sections, too.

Re:New school C by charlieflowers on Wednesday December 26, 2012 @04:32PM (#4971019)
Thanks for sharing. Now I know not to waste time on the book. If I want to learn about Git, I'm not looking to learn it from a book about "Modern C".
Re:New school C by aidenn0 on Wednesday December 26, 2012 @01:25PM (#4970238)
I consider "use autotools" to be dubious advice anyway.
Re:New school C by cageface on Wednesday December 26, 2012 @12:03PM (#4969912)
These days I won't even consider a language for serious work unless it has a reasonable set of built-in datastructures and algorithms. I'm just not interested in shopping around for a basic vector or hash or tree container or for a compatible set of elementary searching and sorting algorithms.

I know you can find implementations of all of these in C but this is the kind of thing that really needs to be built in to any modern language. C is fine for writing device drivers etc where you can't really assume anything about your environment but for anything else it seems too bike-sheddish.

Re:New school C by jlgreco on Wednesday December 26, 2012 @01:46PM (#4970319)
> bike-sheddish

It seems this term has evolved beyond any recognition to me. In what way is choosing C over another language that may provide more built in "arguing over something trivial/tangential"?

Re:New school C by aaronblohowiak on Wednesday December 26, 2012 @12:35PM (#4970029)
... then use glib, apr or acf.
Re:New school C by cageface on Wednesday December 26, 2012 @09:51PM (#4972118)
And hope that any client libraries and APIs I want to use made the same choices I did.

Code reuse at the level of strings and containers is essential for any kind of higher-level programming. C fails here.

Re:New school C by hailkuato on Wednesday December 26, 2012 @11:47AM (#4969850)
I love C for its simple syntax and "charm" (can a programming language be charming?) While the book does look fascinating, I can't help but wonder if it would be easier to go with languages like "Go" which was supposedly designed with 21st century considerations in mind?
Re:New school C by jsaxton86 on Wednesday December 26, 2012 @11:56AM (#4969884)
Yeah, I had the same thought. In fact, in the interview, the author actually picks up a copy of K&R C and looks through the index for "threading" and finds nothing, whereas Go was designed with concurrency in mind.

On the other hand, as the author said, C is over 40 years old. Many consider that a weakness, but he considers it a strength, given the large number of C libraries available, whereas you don't have the same number of libraries with native Go bindings. Ultimately, of course, it comes down to using the right tool for the job. That may be C, that may be Go, that may be a higher-level language like Python, Ruby, etc.

Re:New school C by dualogy on Wednesday December 26, 2012 @01:06PM (#4970162)
Just to be fair though, binding 90% of C libs out there to your Go project is fairly painless & straightforward -- if a tad tedious for bigger libs.
Re:New school C by jlgreco on Wednesday December 26, 2012 @01:51PM (#4970341)
I've heard that doing that with Wayland's libraries is a royal pain because Wayland makes extensive use of function pointer based callbacks. So Go calling C calling Go. I'm not sure to what extent this sort of thing is common though, I haven't seen it often myself.
Re:New school C by cms07 on Wednesday December 26, 2012 @11:15AM (#4969714)
I've got it, and though I haven't read much yet, it's definitely got some good stuff.
Re:New school C by meaty on Wednesday December 26, 2012 @11:22AM (#4969753)
I bought a copy after it was discussed here a while back. Overall it's a very good book and is worth purchasing IMHO. There are some notable holes and assumptions but it's probably the best attempt for a number of years.