Re: [vox] Why C?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [vox] Why C?
On Sun, 2002-02-24 at 11:50, R. Douglas Barbieri wrote:
> The nice thing about C++ is that it is more type strict than C. For
> example, in C, you can call an un-prototyped function, and merely get a
> warning (if you remember to turn on that specific warning). But in C++, it
> is an error--you *must* prototype your functions. It is much stricter on
> casting, and it allows you to define your own types. Of course, the most
> effective way to use the language is to embrace the object-oriented
> paradigm and program that way.
It's worth noting that the entire idea of prototyping was borrowed from
C++ - that is, prototypes didn't exist in C until C++ had 'em.
However, my opinion is that C++'s type strictness tends to be in the
wrong areas sometimes. (C has always allowed you to defined your own
types too, BTW - the struct). I think C++'s treatment of assignment
from void pointers is completely braindead - after all, what is the
point of void*, which in C was a "universal" type, if you have to cast
> I recommend Stroustrup's "The C++ Programming Language"
> http://www.research.att.com/~bs/3rd.html. He takes you through all aspects
> of C and C++. Al Stevens also has a really good book called "Teach
> Yourself C++;" it was the book I used to teach myself the language (of
> course it was a very old edition--gosh I'm not getting any younger...).
The "Teach Yourself" books are frequently grossly inaccurate and tech
unportable code. I do not know of the C++ book, but the C book is
Stroustrup's book is, IMO, the best book you can get on C. It reads
like a college text, but it has an interesting approach - it keeps
covering some of the same ground several times, but each time at a more
detailed level. However (and I'm not the only person to feel this way),
Stroutrup's ego seems rather thick through most of the first couple
chapters - he seems to emphasize that he created the language, and that
C++ is superior to C (which I disagree with - they both have some pretty
significant strengths and weaknesses in relation to eachother).
> For Perl, check out the O'Reilly book "Learning Perl." It is a great book
> to start with. Of course, there is the more in-depth Larry Wall's
> "Programming Perl, 3rd Edition," but I believe that "Learning Perl" is
> better as a good introduction to the language. Of course, I haven't
> personally read Wall's book yet--it's on my reading list.
Honestly, I'd recommend the more in-depth book (the "Camel" book) over
the Learning Perl one; the former appears to provide a more cursory
level of understanding in Perl, whereas the other can lead to mastery of
the language. And it is still extremely accessible, written in Larry
Wall's unique and very enjoyable style.
vox mailing list