开发者

Why do programmers sometimes refer to "C++/STL" like it's a separate language?

开发者 https://www.devze.com 2022-12-23 09:56 出处:网络
This may seem a trivial question, but it\'s one that\'s bothered me a lot lately. Why do some programmers refer to \"C++/STL\" like it\'s a different language? 开发者_开发百科The STL is part of the C+

This may seem a trivial question, but it's one that's bothered me a lot lately. Why do some programmers refer to "C++/STL" like it's a different language? 开发者_开发百科The STL is part of the C++ standard library -- and therefore is part of the language, "C++". It's not a separate component, and it does not live alone in the scope of things C++. Yet some continually act like it's a different language altogether. Why?


It's possible to be a competent and experienced C++ programmer and never use the STL. You may be using Boost or ACE, or been an MFC windows programmer for 10 years.

If you want someone experienced in using the STL, asking for someone who knows C++ is no guarantee that you'll get one.

Also for my mind, writing code that's heavily dependent on the STL feels very different to writing, say, MFC code. They might as well be different languages. They certainly won't look particularly similar.


An understanding of the STL isn't necessary to understand C++. It's useful to have when you need ADTs, but you can go (could have gone?) through your whole C++ career without needing it.


The above answers are really good; I'm only going to add to their content in a broader context.

Developers might refer to language/api|library e.g. C/Win32, Java/Struts, Java/Spring, C#/.net MVC because there are in essence two knowledge bases - knowledge of the language in question and knowledge of how to use that specific library, API or framework. Something like Win32 is pretty huge, as is say Django, which I'm currently learning. Django itself works in a very specific way and knowing that is what I'm learning, not Python.

The same is true of C++/MFC or C++/Boost or C++/STL. The language is C++ - the API/library you're using is MFC, Boost or STL.


Probably because STL came a little late to the C++ game, and many people have written code that does not use any STL. For example, think early win32 programming with MFC.


Guess:

When C++ was first released, the STL did not exist. It came into existence later as an optional addition and then was incorporated into the standard.


When writing a resume, people would often list C/C++ as a language, which, in many cases means they don't know either.

Sometime resumes would list "Visual C++" as a language, trying to indicate they don't know what a language is.

This, together with "great knowledge of C++ and PHP" statements, go strait into recycle bin at my firm. Not because they are necessarily bad programmers - but because the interview time waste is not worth it.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号