pleac and Cookbook

J

jonas

Hi,

After a search on
http://pleac.sourceforge.net/pleac_c++/index.html
why C++/STL/Boost have a low %?

I have also wondered about this, being a newbie.

Is it mostly because:
1) All the easy tasks have been accomplished?
2) Remaining problems are idiosyncratic to Perl?
3) Nobody bothers to finish it?

And why C++ Cookbook, and others how-to, manuals, etc. don't have
chapters like:
-Internet Services
-CGI Programming
The Perl, Python, Ruby, etc. have!? why?

Thanks in advance
 
I

Ian Collins

jonas said:
Hi,

After a search on
http://pleac.sourceforge.net/pleac_c++/index.html
why C++/STL/Boost have a low %?

I have also wondered about this, being a newbie.

Is it mostly because:
1) All the easy tasks have been accomplished?
2) Remaining problems are idiosyncratic to Perl?
3) Nobody bothers to finish it?
Probably 3 :)
And why C++ Cookbook, and others how-to, manuals, etc. don't have
chapters like:
-Internet Services
-CGI Programming
The Perl, Python, Ruby, etc. have!? why?
C++ doesn't have built in support for these, unlike the scripting
languages. What is there to say about CGI that isn't in the specification?
 
J

Jerry Coffin

@y43g2000cwc.googlegroups.com>, (e-mail address removed)
says...
Hi,

After a search on
http://pleac.sourceforge.net/pleac_c++/index.html
why C++/STL/Boost have a low %?

Because the "recipes" in this cookbook are oriented
toward things people do with PERL rather than things
people do with C++.

Quite a bit of it covers things most C++ programmers just
don't care about as a rule. Others (e.g. "Modifying a
File in Place with -i Switch") are simply meaningless in
the context of C++.
And why C++ Cookbook, and others how-to, manuals, etc.
don't have chapters like:
-Internet Services
-CGI Programming
The Perl, Python, Ruby, etc. have!? why?

Because people rarely use C++ (at least directly) for
these kinds of purposes. A typical CGI script would gain
virtually nothing by being written in C++. In most cases,
the computation takes far less time than the network
transmissions, so speeding up the computation (even by a
large factor) would contribute little to overall speed.
 
P

Phlip

Jerry said:
Because the "recipes" in this cookbook are oriented
toward things people do with PERL rather than things
people do with C++.

That's just a tautology. Yes, the average programmer will grab a Perl-style
language to manipulate strings. That doesn't mean C++ can't compete with
those languages in this space.
Quite a bit of it covers things most C++ programmers just
don't care about as a rule. Others (e.g. "Modifying a
File in Place with -i Switch") are simply meaningless in
the context of C++.

This is "language X for Y users" territory. If I know Perl, the first thing
that pops to mind when I have that problem is the -i switch. So leading me
from there to a clean and high-level C++ solution would be very useful and
helpful. Especially to rescue me from Perl!

The effect here should work like a "permuted index" at the end of a huge
reference book.
Because people rarely use C++ (at least directly) for
these kinds of purposes. A typical CGI script would gain
virtually nothing by being written in C++. In most cases,
the computation takes far less time than the network
transmissions, so speeding up the computation (even by a
large factor) would contribute little to overall speed.

Execution speed isn't the only reason to use C++.
 
J

Jerry Coffin

That's just a tautology.

Not really -- a tautology is something that's inescapably
true based on the definitions of terms involved. OTOH, I
agree that this is somewhat similar. It's a circular
problem that C++ programmers don't use it that way, so
there's no tutorials for using it that way, so nobody
uses it that way, etc.
Yes, the average programmer will grab a Perl-style
language to manipulate strings. That doesn't mean C++ can't compete with
those languages in this space.

True -- but quite a bit of it is sufficiently specific
that it goes a bit beyond "manipulate strings" and into
subjects that aren't really very meaningful, at least as
stated.

[ ... ]
This is "language X for Y users" territory. If I know Perl, the first thing
that pops to mind when I have that problem is the -i switch. So leading me
from there to a clean and high-level C++ solution would be very useful and
helpful. Especially to rescue me from Perl!

It might be meaningful in that context, but simply as a
C++ cookbook, it's not meaningful at all.
The effect here should work like a "permuted index" at the end of a huge
reference book.

I'm not sure whether you're saying that's the program
you're trying to write, or whether you're saying that's
the basic intent of the web site...
Execution speed isn't the only reason to use C++.

True -- but most of the other purposes are even less
interesting. Just for example, I have precisely zero
interest in creating a CGI script (in any language) to
allow people to manipulate ACLs on the files on my
machine. The difference between C++ and PERL is
irrelevant here -- I don't want it happening regardless
of language.

I can see a situations where using C or C++ for CGI can
be useful. Just for one example, Comeau's online C++
compiler. There are certainly a lot more were a bit of
CGI acts as little more than a front end to some large
piece of software that may well be written in C or C++
(e.g. talking to a SQL database).

The question in my mind, however, is what exactly is
unique to CGI in this scenario -- if memory serves, CGI
basically says you receive a couple of environment
variables as input, and write something like an HTTP
packet on standard output.

I guess what I'm trying to say is that I can't think of
much that's unique about doing it in C++ vs. anything
else. At least to me, it seems like pretty basic
application of everyday programming techniques.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top