101 karma · joined July 22, 2009
Honestly, it's worded very poorly. "Compliant with the latest 2011 standard (C++11)" suggests all of this. I have a hard time believing this isn't some kind of joke - there's literally no-one alive that could write all of this in the timeframe of a course.
std::sort(begin(array), end(array), [](int a, int b) { return a < b; });
Versus: qsort(array, MAX_VAL, sizeof(int), compare);
With compare as defined before. I mean, sure, it's just sorting and it's a tiny example, but to me it shows a lot about why I prefer C++ over C: typesafety, readability, reduced possibility of buffer overflows, reduced possibility of segfaults based on incorrect element access, speed thanks to code inlining vs function pointers... int compare(const void *a, const void *b)
{
return *((int*)a) < *((int*)b);
}
Yuck.In .cpp files it's ok (and almost required if you're using boost, unless you want boost::foo:bar::type everywhere). It still requires a bit of thought, though.
> We don't see these results in adults in other countries because they don't burn out their students at such an early age.
If you've looked at education in other countries, I don't understand how you can say this. Many places push their students far harder than the US (for example, Singapore, Japan, South Korea). Rote memorization is pushed far harder as well. How is the material that is taught any less "useless" in the eyes of students in these countries?
I think culture definitely comes into play here. I'm not going to say incompetent teachers don't exist or that there isn't too much bureaucracy in schools; there clearly is, however, laying the blame entirely at their feet is being dishonest. I think culture and parental expectations play a larger part than many people want to admit.
It's exactly like saying lim as x -> 1 of 2x -> 2. You don't write it that way. You write it as lim as x -> 1 of 2x = 2.