The C++ Reference of the Day

The C++ Reference of the Day

How often have you been asked the variants of such a question: why doesn’t C++ have such a feature? Something like: Why doesn’t C++ automatically initialize -uninitialized- local variables of numeric types to zero? Why doesn’t C++ check the array or vector bounds? Why doesn’t C++ have a garbage collection? Why a class member functions aren’t virtual by default?

My answer: Countless times!


In this article, I would like to introduce a paper that answers such questions:

Andrew Koenig and Barbara Moo. Why Programming Languages Can't Be Perfect. C/C++ Users Journal, August 2005.


The paper was written by Andrew Koenig and his spouse Barbara Moo. Andrew Koenig was one of the most influential in C++ in general and the 1998 standard -C++98- achievement in particular, but he is mostly retired from C++ now.

From the paper's conclusion:

… Every programming language has its quirks, and those quirks are usually there for a reason. Understanding the reasons for those quirks can often show us how to use the language more effectively. Often the answers to such questions are that the language's designers chose a compromise between several conflicting goals. In the case of C++, those goals usually include performance and compatibility, both with C and with past C++ usage. Compatibility issues often turn out to be important for much longer than it might seem at first …

You can download the paper from the following link:

https://www.dhirubhai.net/posts/saeed-amrollahi-boyouki_the-paper-for-modern-c-reference-of-the-activity-7171782994150559744-NLWw?utm_source=share&utm_medium=member_desktop

Enjoy!

要查看或添加评论,请登录

Saeed Amrollahi Boyouki的更多文章

  • Modern C++: Reference of the Day

    Modern C++: Reference of the Day

    Bjarne Stroustrup once mentioned: Modern C++ a.k.

  • Four handy operations for String Processing in C++ {11|20|23}

    Four handy operations for String Processing in C++ {11|20|23}

    This article will explore four practical string processing operations introduced in C++11, C++20, and C++23. They are…

  • The C++ Reference of the Day

    The C++ Reference of the Day

    A C++ programmer should read good books and papers on C++ and should keep learning this great programming language…

  • C++ Reference of the Day

    C++ Reference of the Day

    If someone asks my recommendation on learning both programming and C++ (not C!) from scratch, undoubtedly, my first…

  • C++ Reference of the Day

    C++ Reference of the Day

    As the 2nd post of Modern C++: Reference of the Day, I would like to recommend the following seminar by senior…

    2 条评论
  • Node-based containers vs. Contiguous containers + Generic Algorithms

    Node-based containers vs. Contiguous containers + Generic Algorithms

    Consider the following problem: Given a list of integers, we want to make them unique, which means removing duplicates…

  • C++ Reference of the Day

    C++ Reference of the Day

    Under the Reference of the Day title, I’m on to introduce good C++-related materials including books, papers, videos or…

    4 条评论
  • My modern C++ references

    My modern C++ references

    A few days ago, a friend of mine asked me to introduce good books and references to learn modern C++ A.K.

    17 条评论
  • Let's talk about Modern C++: Learning C++ in Modern Way

    Let's talk about Modern C++: Learning C++ in Modern Way

    This is a brand new course on Modern C++ (C++{11|14|17|20}). The course is 50 hourse and contains a lot of slides with…

    6 条评论
  • C++ Education

    C++ Education

    I can present C++/Java/Python courses and seminars for universities, R&D centers, companies and organizations for…

社区洞察

其他会员也浏览了