C++ standard library - when should I use it and when shouldn't I?

前端 未结 8 579
离开以前
离开以前 2020-12-29 19:23

I was wondering how often people actually use much of the standard c++ library, particularly the stuff in the and

8条回答
  •  一生所求
    2020-12-29 19:37

    it's not a direct answer to your question, sorry. just a cry. I've read previous answers and decided to add my two cents. particularly about and

    What is the main C++ paradigm? Of course, OOP, tree whales etc. every C++ interview has a question about this. But I've never has been asked about functional programming. and is that functional part IMHO. To use them actively you need to think a bit different, to architecture your program making a place for their usage. Typical reasoning: why to use any sorting if I can use a std::map or std::set? isn't this a devil of premature optimization? final result will be accepted in vast majority of cases, just buy better hardware. tricky implementation usually is much simpler to code than to learn that 100+ algorithms and what is more important - to understand how and when to use them. it's complete rocket science.

    consider statistically average software company with 100 C++ programmers. there will be about 10 good specialists. have they any chance to spread good style there? yeah, if they are nature born leaders and work long enough in the company. they need to constantly fight with prejudices like "exceptions are very bad idea", "virtual methods are slow" and "it's just an int, why it's not thread-safe?". and their code cannot be understood by others because of intensive and usage

提交回复
热议问题