4 ms·
That's just silly. What does C++'s language cruft have to do with CS? The C languages are actually missing a lot of the important concepts, like lambdas, and di
by pkulak 17y ago
That's just silly. What does C++'s language cruft have to do with CS? The C languages are actually missing a lot of the important concepts, like lambdas, and discourage other important things like recursion.
- LiveTheDream 17y agoIMO the problem is not so much transitioning away from C++, but to Java. Java is great, and the JVM is especially cool, but I think it's a bad place to start CS education. I saw this C++ to Java transition happen firsthand at a university and compared to before, students developed handicaps on the IDE and had a much harder time grasping concepts like memory management. (Saying you will never write a memory manager in the workplace is irrelevant; it's a learning exercise just like writing quicksort). Also, Java doesn't cover lambas or recursion any better than C++. Part of the fallout that I witnessed was due to bad planning, since later courses expected students to have knowledge that they never picked up in the new intro course. I guess ultimately it just comes down to the student and the professor, not the language, but my view is tainted from that experience.
- pkulak 17y agoYeah, I left Java out of my argument because I agree with you 100%. I think Scheme or Ruby would be much better.
- jemfinch 17y agoWhat does C++'s language cruft have to do with CS? Generic programming, among other things. The C languages are actually missing a lot of the important concepts, like lambdas, Lambdas are functions without names. They're not important concepts, they're really just syntactical sugar. and discourage other important things like recursion. Just because the language doesn't require TCO doesn't mean it discourages recursion; it just discourages teaching recursion with trivial examples like factorial. Quicksort, for instance, would be an excellent place in a C or C++-based course for teaching recursion.
- loup-vaillant 17y ago> Generic programming, among other things. The proper CS name is "parametric polymorphism". This is not as special as "Generic programming". (What is special, is the abysmal C++ implementation of parametric polymorphism.) > Lambdas are functions without names. They're not important concepts, they're really just syntactical sugar. The transformation required to go from a higher order program to a first order one is called "lambda lifting". This goes way beyond syntactic sugar. So, a language which lack lambdas don't fully implement functions… which look like an important CS concept.
- jemfinch 17y ago> The proper CS name is "parametric polymorphism". No, it isn't. You would know this if you actually bothered to understand the terms you used rather than bandying them about in an attempt to win Internet points. Generic programming is a far broader topic than parametric polymorphism: that's why languages which already have parametric polymorphism, like Haskell, have variants which support true generic programming, like Generic Haskell and Scrap Your Boilerplate. > (What is special, is the abysmal C++ implementation of parametric polymorphism.) Given that you obviously don't understand the difference between run-of-the-mill parametric polymorphism and the generic programming enabled by C++ templates (and no other typed implementation except perhaps GADTs, and I remain unconvinced even of that) Id say you're fairly unqualified to be assessing the quality of C++'s implementation of parametric polymorphism. > The transformation required to go from a higher order program to a first order one is called "lambda lifting". This goes way beyond syntactic sugar. Wow, you really seem to enjoy using terms you clearly don't understand. No, lambda lifting doesn't "go way beyond syntactic sugar." It's actually a fairly simple syntactical transformation: the free variables in the function body are converted to arguments to a static function, and closures, when generated, are a simple data structure consisting of a pointer to this static function and the arguments to "fill in" when called. > So, a language which lack lambdas don't fully implement functions… It's hard to believe that you'd even say that, let alone get modded up for doing so. I find it hard to argue against, much like I would have difficulty arguing against someone who said that a country which lacked cars couldn't fully implement wheels. You see, what lambda lifting does is convert closures (which seem synonymous, at least in your writing, with lambdas) into ordinary functions with no free variables. Functions without free variables are more basic than functions with free variables.