Skip to content
HomeVideosBooks
AllTopicsTrends
BlogsPodcasts
HistoryListsWatch laterLiked videosFollowing

The videos, books, blogs and podcasts Hacker News keeps recommending, all in one place.

VideosBooksBlogsPodcastsAboutPrivacySettings

Data from Hacker News, HackerTube, HackerBooks, HackerBlogs and Open Library. Credits · Not affiliated with Y Combinator.

HomeVideosBooksBlogsPodcasts
Ctrl K
    Cover of Advanced C₊₊ programming styles and idioms

    Advanced C₊₊ programming styles and idioms

    James O. Coplien · 1992

    Programming
    Open LibraryAmazon
    Stats for nerds
    4recommend
    7mentions
    5people
    2011–2026years
    86% recommend14% neutral

    Mentions per year

    201120132015201720192021202320252026

    What Hacker News says

    1. rramadassAug 2026
      This technique is often used for security-sensitive projects involving binary protection, obfuscation etc.

      Program Obfuscation via ABI Debiasing (pdf) - https://www.google.com/goto?url=CAESYgHuR6pNsi8_4x_I2WBy7lmf...

      PS: James Coplien in his excellent Advanced C++ Programming Styles and Idioms shows many techniques one of which is actually replacing vtable entries at runtime to mimic features from more dynamical runtime languages (eg. Smalltalk).

      thread
    2. rramadassJun 2023
      Not quite sure what you are trying to say here; but ...

      > the dichotomy of 'implementation' vs 'interface' is drawn on the exact same line as 'variables' and 'functions'.

      That's not true; They are orthogonal to each other.

      OOP is just a way of structuring Procedural/Imperative programming; "variables" maintain state while "functions" change/read state. You are just bundling them together to gain fine-grained modularity. An "interface" is anything (i.e. can be both variables and functions) which is "publicly" accessible by a client. An "implementation" is conversely not accessible by the client (i.e. encapsulated) but can also consist of "variables" and "functions".

      > Why couldn't a single variable or property be virtual and polymorphic?

      Not sure what you mean here but you do have tagged unions/variants/sum types which gives you what you maybe looking for.

      > Why couldn't a member method be reassignable like a member variable?

      It is possible in certain object models. Lookup "Metaclasses" in your favourite language for possible support. If you want to see example code in C++, checkout the classic Advanced C++ Programming Styles and Idioms by James Coplien. The book contains lots of examples of mind-bending OO trickery using C++.

      thread
    3. pacman128Nov 2022
      _Advanced C++ Programming Styles and Idioms_ by James O. Coplien

      It showed me how to really use C++ effectively back in the 1990's. It was at the time in a class by itself. (Pun intended).

      thread
    4. rramadassSep 2022
      C++ actually has two axes; 1) Paradigm axis (i.e. Procedural, Object-Oriented, Generic, Compile-time and Functional) and 2) Usage axis (i.e. Low-level bare-metal, Kernel, Library, Application). Every feature has an ideal application at the intersection of these two axes. Another way to look at it is how best to map concepts from the Problem-domain directly onto language features. Here techniques like Commonality/Variability analysis (bedrock of DDD, Patterns etc.) are used to express concepts using specific language features and then combine those into a coherent design.

      Most of the above design ideas are found only in pre Modern C++ books. I don't know of any newer books which actually teach multi-paradigm design using Modern C++. So you will have to read the older books and then think about how you would map the same ideas into Modern C++. You might find the following useful;

      Pre Modern C++:

      1) Multi-Paradigm Design for C++ by James Coplien.

      2) Scientific and Engineering C++: An Introduction With Advanced Techniques and Examples by John Barton & Lee Nackman.

      3) Advanced C++ Programming Styles and Idioms by James Coplien.

      4) Modern C++ Design: Generic Programming and Design Patterns Applied by Andrei Alexandrescu.

      Modern C++:

      1) Functional Programming in C++: How to improve your C++ programs using functional techniques by Ivan Cukic.

      thread
    5. banned1Oct 2017
      Advanced C++ Programming Styles and Idioms by James O. Coplien

      https://www.amazon.com/Advanced-C-Programming-Styles-Idioms/...

      thread
    6. hyperlinerJul 2014
      Maybe another way of saying "Staying Idiomatic" is "What made you great before won't this time."

      I had to do a C++ project a while back and got my hands on "Advanced C++ Programming Styles and Idioms" by James Coplien through a friend's recommendation. Best thing I ever did to really understand the soul of the language.

      I am sure there is such "soul identifying" book for each language. What would those books be? If you know of one, reply here. I'd love to know them (Go, Haskell). Not just books that show you the syntax, but which show you the soul.

      thread

    Related

    Cover of Advanced programming language design
    2015–2026

    Advanced programming language design

    Raphael A. Finkel
    2 recommend · 7
    Cover of Formal syntax and semantics of programming languages
    2019–2025

    Formal syntax and semantics of programming languages

    Kenneth Slonneger
    2 recommend · 5
    Cover of A method of programming
    2015–2023

    A method of programming

    Edsger Wybe Dijkstra
    2 recommend · 4
    Cover of Low-Level Programming
    2019–2026

    Low-Level Programming

    Igor Zhirkov
    3 recommend · 8
    Cover of Object-oriented programming
    2012–2026

    Object-oriented programming

    Brad J. Cox
    4 recommend · 17
    Cover of Design concepts in programming languages
    2009–2026

    Design concepts in programming languages

    Franklyn A. Turbak
    7 recommend · 11
    Cover of Advanced UNIX programming
    2010–2024

    Advanced UNIX programming

    Marc J. Rochkind
    12 recommend · 26
    Cover of A discipline of programming
    2009–2025

    A discipline of programming

    Edsger Wybe Dijkstra
    16 recommend · 51