u/milch - Archived Voat Post in v/programming
u/milch
  • home
  • search

u/milch

0 posts · 1 comment · 1 total

Active in: v/programming (1)

  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››
Comment on: I've pretty much learned the basics of C++ so far in university, what else can I learn with this knowledge with not too much difficulty?

Here's a good talk by the inventor of C++, Bjarne Stroustrup: Make Simple Tasks Simple. I think it's a really good talk, and it discusses my main beef with "university C++": Every single course I've seen, every single person I've talked to who has had C/C++ at university, they all tell the same thing - they don't learn a single thing about when to use the stack or the heap. I've helped out a friend with their programs once, their professor's tactic was just "always use new, never use anything else, if you do it any other way, you're failing the class".

Bjarne's approach is so damn simple - always use the stack (and don't worry about memory management, the stack clears itself) unless you explicitly need to pass data around outside of your scope, only then use the heap (but use a shared_ptr and don't worry about memory management, because a shared_ptr cleans up after itself).

4 07 Jul 2015 09:24 u/milch in v/programming
  • ‹‹‹
  • ‹‹
  • ‹
  • 1
  • ›
  • ››
  • ›››

archive has 9,592 posts and 65,719 comments. source code.