Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

comment on

( [id://3333] : superdoc . print w/replies, xml ) Need Help??
a Systems langage (e.g. C/C++)

There is no such a thing as C/C++. (It's like referring to Perl as PERL.) It's either C, or C++. They are two different languages.

Since I have used C and C++ for close to fifteen years, let me give you an outline.

C is the prince of languages, the one used to write the very oprtating system I am using at the moment, and the one sued to write Perl. It is efficient, and you can manipulate your system at a very low level. OTOH, it's easy to make huge mistakes, and unless you're really skilled and disciplined, you're going to write horrible code.

C++ was born as a superset of C, by glueing OOP on top of it. Things changed quickly, though, and nowadays you can write C++ code that has little or no resemblance to C. The turning point is the Standard Template Library (STL), which has transformed C++ into a powerful machine that can manipulate complex data and implement common algorithms on that with real ease. C++ with STL can be almost as concise as Perl, with additional efficiency.

That said, both languages have their place in systems manipulation. With C, you can fine tune device drivers, sockets, network interfaces, and the kernel of your OS itslef (provided you are using an Open Source OS, of course). With C++ you can handle vaste amounts of data in cases when Perl would be too slow or would use up much of your system power and memory (e.g. when manipulating huge arrays or matrixes).

I am glad I know both of these languages. I could not get by without either of them. As for learning, I'd say to start with C, because if you start with C++ it would be quite a shock to get down to C subtleties.


In reply to Re: Suggestions for system languages to complement Perl? by dbwiz
in thread Suggestions for system languages to complement Perl? by radiantmatrix

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.