Skip to content

Instantly share code, notes, and snippets.

@PeterTh
Last active July 6, 2017 12:34
Show Gist options
  • Select an option

  • Save PeterTh/810f503c28a53847f4456fa216ee1c16 to your computer and use it in GitHub Desktop.

Select an option

Save PeterTh/810f503c28a53847f4456fa216ee1c16 to your computer and use it in GitHub Desktop.
Why teaching modern C++ at UIBK in the Bachelor level is a good idea

Why teaching modern C++ at UIBK in the Bachelor level is a good idea

Popularity

  • C++ is ranked among the top 5 in the vast majority of important programming language popularity / interest metrics, including:

  • Crucially for science, it is ranked #1 in the 2016 IEEE Spectrum programming language rankings for open source projects

  • Of these most popular languages, C++ is the only one which provides a higher level of abstraction than C and is in active use in everything from device drivers over hard realtime embedded systems, simulations, commercial desktop applications, and games, all the way to the largest supercomputers in the world.

Didactic Value

  • C++ is a multi-paradigm language

    • This allows for integrating imperative, functional, object-oriented and metaprogramming concepts in a single framework. Our current teaching is usually focused exclusively on one or two of these.
    • The flexibility offered brings it closer to the non-pure real-world application domain in which the vast majority of all software is expressed.
    • Modern C++ is most certainly not "C with object oriented concepts". In fact, it's likely that you will encounter more functional, meta-programming and structural/duck-typing concepts in a modern C++ library than classic object-oriented concepts (e.g. inheritance).
  • C++ provides low-level access when required

    • A boon for all kinds of performance-oriented programming (at this point somewhat neglected in the Bachelor studies).
    • Also a didactic boon since important concepts in concepts such as the distinction between reference and value semantics, R- and L-values or copy and move semantics can be demonstrated and explored entirely in-language.
    • Allows later steps in the curriculum which require knowledge of a low-level and/or performance-oriented language to focus more on their actual subjects rather than each individually catching up on C++ basics.
  • Modern C++ allows using and building high-level abstractions

    • Entirely in-language, which means that the implementation can be inspected and discussed in a classroom setting.
    • With a massive amount of existing code of various levels of complexity which can be leveraged for teaching.
    • With 0 runtime overhead.
  • Using C++ at larger scale implicitly teaches about the value of good tooling

    • IDEs, since unlike most scripting languages static (optionally automatic) typing provides very valuable code comprehension aid.
    • Debuggers, since the potential for low-level access also brings the potential for all manner of interesting faults.
      • Note: this is not a disadvantage, most certainly not from a didactic perspective. Professional programmers will eventually encounter complex fault scenarios, the sooner we equip them to deal with them the better.
    • Build tools, as the build process can become rather involved and/or lengthy.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment