3 ms·
The languages, idioms, and ecosystems are different enough that I don't see that as a problem. They should be treated like two different languages. You wouldn't
by bstamour 9y ago
The languages, idioms, and ecosystems are different enough that I don't see that as a problem. They should be treated like two different languages. You wouldn't read a C book and expect to understand the conventions of C#. Neither should you for C++.
- ansgri 9y agoThe problem is, C-only codebases are pretty rare, even established ones adopt C++ (e.g. Darktable, which has a rather advanced C-only object system for UI and plugins). Especially in 'hot' topics like AI, where there may be place for pure C, but actually you'd more often use some low-level subset, like C with templates (very useful in writing image processing libraries). And no, I don't think it's reasonable to learn the modern C++ straight away, skipping C part: its abstractions are very leaky, you need to understand underlying resource management and type system. If you don't plan to learn C++ later, okay, do use a modern version, but if this is a possibility, better start either in completely different language with more clear semantics (pascal was great, maybe some Go or Rust are good now), or the pure subset, which wouldn't add to later confusion but would allow to use more advanced abstractions as needed. From my experience teaching software engineering to high school students which already passes their algorithms & programming courses, small differences in practices and/or semantics (svn commit vs git commit) is what kills learning progress.