The C Containers Library

T

Tim Rentsch

Ben Bacarisse said:
Tim Rentsch said:
[..somethin..]

[... snip detailed explanation of C++ lambdas ...]

It's a mixed bag, really. The form [](args){body} is not really a
closure at all (it's just an anonymous function pointer) but
[&](args}{body} is pretty much indistinguishable from a closure. The
[=](args){body} form is a curious thing that's, well, curious (but
useful).

Excellent explanation. Turns out I wasn't as confused as I
thought I was, but I wouldn't have known that without your
comments (or possibly a lot of work on my part looking for
the information elsewhere). Thank you for taking the time
to explain it all.
 
Ö

Öö Tiib

בת×ריך ×™×•× ×©×™×©×™, 27 ביולי 2012 19:28:19 UTC+1, מ×ת W Karas:
When STL first came out I thought that maybe it was the end of C.
The STL containers did provide runtime performance and
encapsulation that you had to handtune C to match.

But actually the result was the reverse. I think it was because STL
made the syntax for just declaring an array and stepping through
it too cumbersome.

That is unfortunately true. The STL was standardized in head-over-heels
hurry. So its interface is not too uniform and it does confuse novices.
Also lot of things were lacking in it. C++2011 takes decent leap
to make standard library lot more complete and useful.
That was the point at whcih people stopped switching from C to C++,
and started moving from C++ to other languages.

1998? There did come languages to what to switch. Most popular ones
PHP, Javascript and Java (~1995), C# and Python (~2000). It is all good.
Not everything is worth writing in C or C++. Also some did regret the
move. Visual Basic for example is mostly dead now.
C++ had a huge user base behind it and is still a popular language.
But ever since STL it's been in decline.

That decline will not happen. What actually competes with C or C++?
Most useful things are written either in C or in C++. So nothing
competes with those languages.
I'm current programming under Qt. However I've deliberately written
all the non-GUI elements of the program in C. Even the C++ elements
aren't really C++, because Qt preprocesses them to make the signals
and slots mechanism work. C++ doesn't provide the flexiblity to do
this natively.

That is nonsense. QT was designed 1991. C++ did not contain templates
back then. They have later taken templates to use. Maybe they will
templatize the signals and slots too one day.
 

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
474,077
Messages
2,570,569
Members
47,206
Latest member
MalorieSte

Latest Threads

Top