8

What is the messiest C++ program ever?

Comments
  • 10
    All of them
  • 1
    I have great interest in learning programming. I would like to learn C++. Where should I start?
  • 2
  • 2
    @MargaretGilliam
    Start with Assembly language.
    Then comes C - and then C++.

    If you code in memory unsafe languages, you really need to know what you do.
    Also never code while tired or distracted as some of the RCE-enabling bugs will definitely make it into production.

    If you can do it in a memory-safe language - do it in a memory-safe language. But if you have to use a memory-unsafe language, triple-check your code extra carefully _on_different_days_ before actually pushing it.
  • 2
    My programs for my Robotics team.
  • 1
    @Oktokolo C++ gives you smart pointers and even lets you define your own so that you never have to use new or delete in code not exclusively responsible for memory management.
  • 1
    I know most C++ isn't like that, but it is a viable option.
  • 1
    c++ is messy by itself
  • 0
    @Haxk20
    C is a memory-unsafe language.
    And choosing a memory-unsafe language makes it a lot more likely, that there are RCE bugs in the code.
    So if the coder isn't a higher being not creating bugs, it is in general a pretty bad idea to do something in C when it could be done in a memory-safe language.
  • 0
    @Haxk20
    No problem.

    You obviously can't build the whole Linux kernel in a memory-safe language.
    Some try to make it possible to use Rust there to get memory-safety by default for the majority of code which doesn't actually need memory-unsafety. But it seems to not be there yet...
    Legacy code also is a thing - and someone has to maintain it.
Add Comment