Big-Goofy wrote:
> I already know programming in Java and I am starting studying the
> perl.
I have used Perl for years, and come to the conclusion that its author,
Larry Wall, must be a very fast, accurate typist.
Download Ruby to see how clean and elegant a language can get!
> I would like to learn C or C++ but I need someone to tell me
> the + and - of each one. I have noticed that every computer exploit
> and almost every linux program is builted in C why is that?
Roughly speaking, C is older and more Standard, so it has a much bigger
establish corpus of legacy code. Including Linux. By "more Standard" I mean
that more Standard-compliant code has been written to work in more
Standard-compliant compilers than C++.
(I suspect we still don't have a standard-conforming compiler, despite
almost a decade of a ratified Standard. And I suspect that the committees
are upgrading this Standard before it even achieves compliance!!)
Entry level programmers don't need to worry about any of that. Learn C++
first, and learn enough C to diagnose and debug it. Learn C++ as a
high-level language, starting with features like std::string. Then learn C
things like strlen(), so you can avoid the troubles these cause.
> Because
> they just know to program in C or C is better for that kind of
> programs and why?
Anything you can do in C, you can do the same way, with better typesafety
and more conveniences, in C++.
Almost anything you can do in C, you can do better in C++ using Object
Oriented, Generic, and similar paradigms.
The only thing you can't do is the very last step of optimization. Kernels
like Linux's need that (and you _don't_), so they must use C-style code. C++
can compile C-style code, so they still don't need C.
Most C code can be tweaked to compile in C++. But Linux shouldn't compile as
C++ because Linux works on many kinds of CPU hardware, and some of them
don't have C++ compilers. Only situations without a C++ compiler strictly
need C.
> Can somebody give an example of big project that
> you can achive with C and you cant with C++ or vice versa?
C++ is better for very large projects because it allows you to create
modules and components better than C. C has poorer support for
encapsulation, which is a good high-level technique to prevent bugs.
> Also can
> somebody suggest me a book for both of them ! (I dont want something
> for begginers i want something to be as much complete book as it can
> be, with all the topics you need to know for a programming language
> .)
Tip: Most programming today should not be in a C language at all. It should
be in a soft rapid language (like Ruby or Python) where you don't need to
reinvent the wheel all the time.
To proceed in C++, read /The C++ Programming Language, 3rd Edition/ by
Bjarne Stroustrup. It fits the "complete" spot you requested.
--
Phlip
http://www.greencheese.us/ZeekLand <-- NOT a blog!!!