|
![](/i/fill.gif) |
Darren New <dne### [at] san rr com> wrote:
> Warp wrote:
> > Darren New <dne### [at] san rr com> wrote:
> >> Warp wrote:
> >>> std::for_each(someList, [&total](int x) { total += x });
> >
> >> And, really, what's the advantage of this over a normal for loop?
> >
> > Nothing. Since it's C++ code, it sucks.
> You know, if you're not mature enough to have a civil conversation, you
> don't really need to participate.
You really are a master of trolling, you know. I have to admire that.
First you succeed in trolling me with your unusually heavy and biased
C++ bashing, and then you try to make it look like all you wanted to do
is have a simple civil conversation.
You know perfectly that there's at least one person reading this
newsgroup who appreciates the C++ language and doesn't appreciate
excessive bashing, yet you deliberately write really inflammatory
comments and mocking about it. Every question you made about new C++
features were aimed solely at trying to find flaws in them. When your
questions were answered, you asked more questions, trying to find flaws.
You continued asking questions until you found some flaw you could point
out. (Eg. first you asked if lambda functions would use such a cumbersome
syntax as boost::lambda, and when you got shown that they won't, you asked
if you can assign lamdbda functions to variables, and when you got shown
that you can, you continued asking and asking until you found something
that you can consider a flaw so that you could mock the whole feature.
The whole purpose of this was clearly to find some flaw you could point
out.)
You know perfectly that if you start such a heavy bashing, you are going
to piss off at least one C++ fan, yet you deliberately go on, perfectly
knowing what effect it will cause. I think that deep inside you enjoy
doing that.
Then, when you succeed in your trolling, you act all innocent and civil
and complain that all you wanted to do is have a "civil conversation".
After making me all angry with your condescending attitude you can go
and safely call me "immature" and make yourself look so high and mighty.
You really are good at trolling. Personally I could not get even near
that level of mastery.
> I asked an actual useful question, so I
> could perhaps learn why people are working to put lambdas into the language
> when they have restrictions that make them useless for what most other
> people use lambdas for. If your only answer is "there's no advantage of
> lambdas over coding a regular for loop", then yeah, C++ sucks.
The std::for_each() function was only a simple example. There are many
other algorithms which cannot be implemented with a simple loop.
Another example: You could give std::sort() a comparator as a lambda
function which has access to the variables in the local scope, something
which is very laborious to do currently.
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |