3 ms·
I don't think C++ would give you a good grounding for a language like C#; too much emphasis on manual memory allocation, and insufficient exposure to higher-lev
by barrkel 16y ago
I don't think C++ would give you a good grounding for a language like C#; too much emphasis on manual memory allocation, and insufficient exposure to higher-level abstractions, like lambdas and monads (as IEnumerable<T> effectively is).
- brownegg 16y agoMaybe. Manual memory allocation is no longer a best practice for "normal" C++ projects, and I'm not sure how much easier C#'s syntax for higher-level abstractions is relative to template metaprogramming. Both are convoluted, obviously.
- steve-howard 16y agoC++0x, which already has a few partial implementations (including VS2010's), does have lambdas.
- maximilianburke 16y agoIt all depends on the type of C++ you are writing. It is such a vast language that usage patterns can range anywhere from C90 plus declare-where-used and single line comments to something that in practice isn't a whole lot different than C#. Modern C# includes RAII-like idioms with using statements and IDisposable replacing C++'s destructors, and C++ manages to fake garbage collection using smart pointers. It's not an ideal basis but there are worse languages to learn before coming to C#; it might even be easier for C++ programmers to move to C# and begin working comfortably than Java programmers.