>>2
Agreed. Sadly, the C++ people will probably keep going with this until they have a bunch of features from other languages all cobbled together, so that way they will have the ultimate justification for not learning/using a language other than C++ (rather than the real reason, which is stupidity).
Actually, I just looked up what the lambda expressions look like. Jesus Christ, what a pile of shit. According to Wikipedia, summing the values of a vector looks like this:
std::vector<int> some_list;
int total = 0;
std::for_each(some_list.begin(), some_list.end(), [&total](int x) {
total += x;
});
>>10
If they were true "optimization" assholes, they probably wouldn't have used a vector.
I'm sure they used ed vi on their Arch Linux machines with 200 megs of RAM, only 3 of which are used to load up their custom window manager written in C that is limited to opening one xterm instance at a time to write and test that example, however.
>>9 [&total](int x) { total += x; } It's funny; when I was thinking of my own toy language I envisioned a very similar syntax for lambda expressions/closures.
I'd think that a proper committee with educated people could do better.
>>12
If you think about it, anyone who knows a real functional language well enough to suggest something better probably wouldn't fucking bother working on adding lambda expressions to C++ in the first place.
To be fair though, C++'s syntax has always been shitty. They're probably just trying to be consistent at this point.
>>11 I'm sure they used vi on their Arch Linux machines with 200 megs of RAM, only 3 of which are used to load up their custom window manager written in Cthat is limited to opening one xterm instance at a time to write and test that example, however. HARDCORE UNIX MASOCHISTS
this is getting sooooooooooo stupid, every programming language adds bullshit functional programming syntax to make their language more *edgy*
lambda functions- try inline functions bitch
closures- only works with languages with nested functions, a total waste on C family of languages
high order functions- try function pointers bitch
I could go on, but I just want to say IM NOT IMPRESSED BY YOUR FUNCTIONAL PROGRAMMING SYNTAX ADDED TO PROGRAMMING LANAGUAGE XXX
>>16
You clearly don't understand functional programming.
Name:
Anonymous2011-01-23 19:59
>>16 Hey boy, no more worries, put on a smile for me
Hey girl, no pain no gain is what they say, right
Ok, no need to stress, ok, brush it off your chest
Through the rain there's a brighter day, don't worry be happy
>>25
He might as well stop being a dick about it and call it a new dialect (or language). I think what he's doing is kind of cool, but having no public formal specifications and no implementation kinda sucks.
>>28
C++ can't have a garbage collector.
One of the first things we did when learning C++ in university was writing our own memory management. It's one of the things you will have to learn if you want to write efficient software.
When you pick C++ (e.g. when writing for embedded systems or other performance dependant problems) you can't have a garbage collectors because it introduces too much overhead. etc etc IHBT
>>33
How about I see you in a few years when your parents kick you out and you're washing the front window of my mercedes at some intersection to pay for your cheetos addiction.