Coder Social home page Coder Social logo

Comments (4)

 avatar commented on August 16, 2024

+1.

I can also see the value in some "this is a security vulnerability" examples.

from cpppatterns-patterns.

sftrabbit avatar sftrabbit commented on August 16, 2024

My personal opinion is that the sample description should point out any improvements this modern style has over earlier attempts. Perhaps more of the existing samples need this. I'd want to avoid showing bad examples at all (in case there is any confusion).

from cpppatterns-patterns.

thecoshman avatar thecoshman commented on August 16, 2024

My initial reaction would be the same, why show 'bad' way of doing things?

Well, an obvious reason is to show what not to do.

Perhaps it needs to be managed in a different way though, some sort of "Samples of Modernising Old C++". There are some who have old code bases, but could work on upgrading, so I am sure they would appreciate seeing not just that the code is bad, as I am sure they know that, but how to update it.

I would definitely not muddy this collection with examples of old style C++. There are a lot of things that are done bad, even though earlier versions of C++ provided the tools for not doing such shameful things.

from cpppatterns-patterns.

luizberti avatar luizberti commented on August 16, 2024

My rationale comes from the rocks I hit while learning C/C++. It's an old language. Really old. Most resources for it are equally old, and it's hard to have updated ones, with modern features and what not.

You have a collection of samples of C++ that are modern, and if they are modern it's because there obviously were at some point, old, and worse ways to do it. The great thing about having this contrast with old examples would be a more descriptive way to explain why the modern examples are modern. It would show what are the advantages of taking that route, and why we no longer do it the old way.

It would become a wonderful resource to update people from the old ages to updated tactics. Maybe add a toggle button that shows a side by side of good and bad, but the bad stays hidden by default. That way it wouldn't be confusing, since people would only see bad code if they clicked the button that says "Show Bad Code" or something.

from cpppatterns-patterns.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.