Talk:Programming:c

There's a nice public domain C/C++ primer available here; there are also two FDL licensed books on http://savannah.gnu.org which I'll dig up if there's interest, and a C++ wiki, linked from the Wikipedia C++ article.

Would it be a good idea to integrate these as a basis? I'd go with the first link for the general basis, as it covers both languages. I'll do the conversion if people agree that it's a good idea. -- Jimregan 17:53 17 Jul 2003 (UTC)


 * I don't like the general idea of C/C++ being taught as one - printf and scanf are not useful/recommended in C++ and cout< > are invalid in C. Vectorsite (your first link) covers C with a footnote on C++ at the end. File methods are different, memory allocation is different, string manipulation is different (I'd love to be using std::string if I knew it better than the char* methods)...if not separate C and C++ books, there should be C- and C++-specific variants of some sections/chapters. Even Bjarne Stroustrop mentions somewhere on his website he doesn't like the phrase "C/C++" - the languages are too different. Geoffrey 00:11 18 Jul 2003 (UTC)

I agree with the C/C++ problem. I've decided that it might be good to just do a version of each chapter. And then a third chapter that will compare the differences between each language. What do you guys think? Josh

Well, when I said use them as a basis, that's what I meant. The languages have many differences, yes, but they also have a lot in common. I've put a wikified version of the vectorsite stuff in my user namespace; I would use them as a basis, and split them out - it's a primer, not a textbook proper.

We could easily have textbooks for different angles; C++ for beginners, C++ for C programmers, or C for C++ programmers. There's a lot of overlap here, articles could be shared, others adapted for a different approach. For example, the introduction to classes in C++ would be the same for absolute beginners as it would be for C programmers interested in C++. I think it's better to start with something than to start from scratch, and the vectorsite stuff gives that. And if nothing else, the quick reference would make a good appendix.

-- Jimregan 17:37 18 Jul 2003 (UTC)

I think that the vectorsite stuff could make a good reference, but I don't like its methods. I remember that when I was originally learning how to program that I read some of those books, but they never really helped me a lot. I never really got good at programming until I actually tried to write some semi-big programs. So I was thinking of trying to teach it, and introduce all of the concepts through the use in programming something. For example, I've written a really small game, Pitfall (you an ASCII character falling down a pit of ascii characters), that can be programmed to introduce most of the beginning concepts of programming. I don't just plan to give it to them, and then explain it line by line, I was thinking I'd walk them through the process of programming (introduce them to the mind set of programming) it.

-- Josh /time

The languages are only really common at core syntax. C++ includes C functionality, but it is expected that most of it is not used. Completely different approaches are taken to the same tasks. For example, #define versus const. A "dual" approach will have to explain that in C, const variables can't be used in constant expressions. Beyond the most basic things, C++ does things differently than C: printf versus cout, malloc versus new, pointer versus reference, array versus vector, char* versus string, and so on. The basic syntax is similar but that is hardly grounds for the whole languages being similar. (Occasionally, the lower-level C things like #define's are proper and necessary, but they'll still not the usual C++ way.)

Also, those who only want to learn one or the other will be annoyed with all the extraneous information.

I think we should have separate textbooks for each language, which do not closely parallel each other. (Many C++ things don't have any C parallels, anyway.)

Eric119 22:19 20 Jul 2003 (UTC)

Can the title "Programming:c" be changed to "Programming:C" ? Lfwlfw 02:53 24 Jul 2003 (UTC)

Begat?
Why say that (for example) A begat B; B begat C etc... Rather than using a less archaic word?