Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Use cases for C++

Reply
Thread Tools

Use cases for C++

 
 
Achim Schneider
Guest
Posts: n/a
 
      10-19-2008
I recently (6 months ago, that is) started to learn C++ because it's
needed in a significant number of job ads, now find my way around but
utterly lack routine. Besides doing boring exercises like "implement
that and that data structure clean and efficient", I feel that what I
really need to do is some sort of full-fledged (however small) program,
not something abstract. I do know C quite in-depth, though.

However, I can't think of a thing to do where I wouldn't choose Haskell
or Scheme before even considering C++, which may very well be because
my greater expertise in the former ones makes me blind for C++'s
strengths.

So, here's my question: What kind of program/project is C++'s home
turf, where you just can't get around using it on a big scale (that
is, excluding library interfaces and small amounts of generated code)?


PS: No, I'm not trying to start a flame war. I really don't know.

--
(c) this sig last receiving data processing entity. Inspect headers
for copyright history. All rights reserved. Copying, hiring, renting,
performance and/or quoting of this signature prohibited.
 
Reply With Quote
 
 
 
 
Erik Wikström
Guest
Posts: n/a
 
      10-19-2008
On 2008-10-19 20:05, Achim Schneider wrote:
> I recently (6 months ago, that is) started to learn C++ because it's
> needed in a significant number of job ads, now find my way around but
> utterly lack routine. Besides doing boring exercises like "implement
> that and that data structure clean and efficient", I feel that what I
> really need to do is some sort of full-fledged (however small) program,
> not something abstract. I do know C quite in-depth, though.
>
> However, I can't think of a thing to do where I wouldn't choose Haskell
> or Scheme before even considering C++, which may very well be because
> my greater expertise in the former ones makes me blind for C++'s
> strengths.
>
> So, here's my question: What kind of program/project is C++'s home
> turf, where you just can't get around using it on a big scale (that
> is, excluding library interfaces and small amounts of generated code)?


C++ can be used for just about anything you can think of, but the place
where you more or less have to use C++ (or C, or perhaps Ada) is system
programming or when targeting more "exotic" platforms where the runtimes
needed by more flashy languages do not exist. Or embedded systems where
resources are scarce, or when performance is required (most games are
written in C or C++).

--
Erik Wikström
 
Reply With Quote
 
 
 
 
Matthias Buelow
Guest
Posts: n/a
 
      10-19-2008
Achim Schneider wrote:

> So, here's my question: What kind of program/project is C++'s home
> turf, where you just can't get around using it on a big scale (that
> is, excluding library interfaces and small amounts of generated code)?


The one you want to burn most money on. C++ must be the least productive
language I've ever had the displeasure to come across.
On a different note, it's more or less the only choice for portable GUI
applications, because of wxWidgets and Qt, as long as you don't want to
use Java, that is.
If you know Scheme or Haskell well, you will weep.
 
Reply With Quote
 
Juha Nieminen
Guest
Posts: n/a
 
      10-20-2008
Achim Schneider wrote:
> However, I can't think of a thing to do where I wouldn't choose Haskell
> or Scheme before even considering C++, which may very well be because
> my greater expertise in the former ones makes me blind for C++'s
> strengths.


One strentgh C++ has over many other languages is that it allows you
to write programs which handle enormous amounts of data, applying
complicated heavy algorithms to them, as efficiently as possible,
consuming as little memory as possible, while still maintaining a fair
level of abstraction and high-quality design in your code.

I may be a bit biased in this subject because I have worked for years
in projects where speed and memory usage were absolute imperatives
(basically the more memory-efficient the program, the larger inputs it
could handle in the same computer, and thus the better). While C++ is
not the perfect language in all possible regards, I have found it to be
excellent for these types of applications.

For some reason the vast majority of programmers don't seem to be the
least concerned about the memory usage of their programs. Sure, most
programs simply don't need to worry about memory usage because they
simply don't handle that much data, and current computers have plenty of
memory. However, when you have to handle humongous amounts of data, then
memory usage optimization steps in big time. And of course if your
program can run the algorithm in 5 minutes rather than 5 hours, all the
better.

The great thing about C++ is that you usually are able to implement
these optimizations while keeping a high level of abstraction and
reusability.
 
Reply With Quote
 
Juha Nieminen
Guest
Posts: n/a
 
      10-20-2008
Matthias Buelow wrote:
> C++ must be the least productive
> language I've ever had the displeasure to come across.


Then you clearly haven't tried C.

(And don't believe *anything* C hackers will tell you. They are
delusional.)
 
Reply With Quote
 
Matthias Buelow
Guest
Posts: n/a
 
      10-20-2008
Juha Nieminen wrote:

>> C++ must be the least productive
>> language I've ever had the displeasure to come across.

>
> Then you clearly haven't tried C.


I don't think you'd like my answer.
 
Reply With Quote
 
Bo Persson
Guest
Posts: n/a
 
      10-20-2008
Achim Schneider wrote:
> I recently (6 months ago, that is) started to learn C++ because it's
> needed in a significant number of job ads, now find my way around
> but utterly lack routine. Besides doing boring exercises like
> "implement that and that data structure clean and efficient", I
> feel that what I really need to do is some sort of full-fledged
> (however small) program, not something abstract. I do know C quite
> in-depth, though.
>
> However, I can't think of a thing to do where I wouldn't choose
> Haskell or Scheme before even considering C++, which may very well
> be because my greater expertise in the former ones makes me blind
> for C++'s strengths.
>
> So, here's my question: What kind of program/project is C++'s home
> turf, where you just can't get around using it on a big scale (that
> is, excluding library interfaces and small amounts of generated
> code)?
>
>
> PS: No, I'm not trying to start a flame war. I really don't know.


Have you checked out this list of major C++ applications?

http://www.research.att.com/~bs/applications.html


Things like telecom, CAD, games, operating systems, compilers,
databases, web servers, and Java VMs



Bo Persson


 
Reply With Quote
 
Carlo Milanesi
Guest
Posts: n/a
 
      10-20-2008
Matthias Buelow has written:
> Achim Schneider wrote:
>
>> So, here's my question: What kind of program/project is C++'s home
>> turf, where you just can't get around using it on a big scale (that
>> is, excluding library interfaces and small amounts of generated code)?


C++ is best suited for large system programming projects.
By "large", I mean that requires at least four developers working for at
least four years.
You can try to develop a device driver or a bytecode interpreter.

> The one you want to burn most money on. C++ must be the least productive
> language I've ever had the displeasure to come across.


Of course you never came across system programming languages.

> On a different note, it's more or less the only choice for portable GUI
> applications, because of wxWidgets and Qt, as long as you don't want to
> use Java, that is.


I think that C++ is not the best language to build portable GUI
application, and needless to say it is not the only one.
GUI application code is not standardized, hasn't tight speed and memory
requirements, and requires quick builds, so C++ doesn't shine for that
purpose.
It is a good language to implement a GUI toolkit (as wxWidgets or Qt),
though.

> If you know Scheme or Haskell well, you will weep.


There are many people who know Scheme or Haskell and don't weep when
using C++.

--
Carlo Milanesi
http://digilander.libero.it/carlmila
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Home server cases and external firewire cases thingy@nowhere.commy NZ Computing 5 03-14-2006 07:56 AM
How to become good in Documentation and use cases Patrick.O.Ige ASP .Net 1 12-11-2005 02:39 AM
Point of Sale Use Cases Andreas Pauley Python 0 05-26-2005 08:52 AM
RMI reliability in RPC-like use cases Alan Cyment Java 1 01-29-2004 02:55 AM
Use Cases -- A minimalist's View Uncle Bob (Robert C. Martin) Java 0 07-02-2003 02:45 PM



Advertisments