The Answer Is in the Standard
I asked an AI what is the best C++ container, and it gave the correct answer. "It depends." What is the best C++ container? There is no definitive answer to this question as it depends on the specific needs of the application. However, some of the most popular C++ containers include the standard template library (STL), the boost library, and the Qt library. I mean, the answer is right in the standard. ©ISO/IEC N4892 abstract data types, such as stacks or queues, out of the basic sequence container kinds (or out of other kinds of sequence containers that the user defines). [ Note 1: The sequence containers offer the programmer different complexity trade-offs. vector is appropriate in most circumstances. array has a fixed size known during translation. list or forward_list support frequent insertions and deletions from the middle of the sequence. deque supports efficient insertions and deletions taking place at the beginning or at the end of the sequence. When choosing a container, remember vector is best; leave a comment to explain if you choose from the rest! — end note ] 3 In Tables 77 and 78,
A social media post says an AI answered “It depends” when asked which C++ container is best. A reply points out that the answer is literally written in the C++ standard, where the highlighted note says that vector is best. The joke is a programmer’s pedantic reading of “it depends” and a humorous appeal to authority. objects
social media post / публикация в соцсетиcomputer screen / экран компьютераcode playground / площадка для кодаtext box / текстовое полеhighlighted text / выделенный текстC++ code / код C++web browser interface / интерфейс веб-браузераISO/IEC document / документ ISO/IECtechnical standard / технический стандартdocument page / страница документаblack background / чёрный фонreply comment / комментарий-ответ
- @ithueti / 6754 2022-06-21
- Template
- programmer joke screenshot
- Type
- image
- Size
- 722×800 · 84.9 KiB
- Mood
- sarcastic, pedantic
- Language
- en
- Added