Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C++ (http://www.velocityreviews.com/forums/f39-c.html)
-   -   Use cases for C++ (http://www.velocityreviews.com/forums/t640553-use-cases-for-c.html)

Achim Schneider 10-19-2008 06:05 PM

Use cases for C++
 
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.

Erik Wikström 10-19-2008 07:37 PM

Re: Use cases for C++
 
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

Matthias Buelow 10-19-2008 10:54 PM

Re: Use cases for C++
 
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.

Juha Nieminen 10-20-2008 04:10 PM

Re: Use cases for C++
 
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.

Juha Nieminen 10-20-2008 04:12 PM

Re: Use cases for C++
 
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.)

Matthias Buelow 10-20-2008 04:16 PM

Re: Use cases for C++
 
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. :)

Bo Persson 10-20-2008 04:45 PM

Re: Use cases for C++
 
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



Carlo Milanesi 10-20-2008 08:52 PM

Re: Use cases for C++
 
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


All times are GMT. The time now is 05:20 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.