Is STL a part of C++ programming language?

B

blackswift

Hello all,
I know STL is part of the standard.
Is STL a part of C++ language?

I heard scanf function is not a part of C.

Best regards.
 
P

Phlip

blackswift said:
I know STL is part of the standard.
Is STL a part of C++ language?

I heard scanf function is not a part of C.

STL is written in C++, and scanf() is written in C and portable to C++.

Here's why you heard these things. In a language like BASIC, the command
PRINT is a keyword. You can't write PRINT in BASIC, and it does magic things
(such as tricks with the ; delimiter, IIRC) that are beyond the ken of
BASIC's functional abilities.

Keywords are the things that turn blue in your editor. Things like int and
if. Operators are the marks like & and * that are also built-into the
language.

C++ keywords and operators are sufficiently powerful that you can trivially
write the equivalent of PRINT using them. So much of the functions that come
with every C++ implementation are powerful functions and classes written
using the core language's keywords and operators.

Someone might reply "STL is part of the ISO C++ Standard so it's part of
C++". That's mildly correct, and a tautology. Things that are part of a
language's Standard are of course part of the language. But none of the C++
implementations exactly follow the standard (IIRC), so we are really talking
about a de-facto standard here.

Further, the STL is defined so you can invent your own containers,
iterators, and algorithms, and you can mix and match these with the Standard
ones. Heaven for people mired in PRINT!
 
V

Victor Bazarov

blackswift said:
I know STL is part of the standard.
Is STL a part of C++ language?

No, if you want to be precise. There is _language_proper_ and then
there is library. The library is based on the language definition
and provides additional facilities that make life easier. Chapters
1 through 16 of the Standard define the language proper, chapters
17 through 27 define the library.
I heard scanf function is not a part of C.

That you'd have to ask in comp.lang.c.

V
 
T

Tom Widmer

blackswift said:
Hello all,
I know STL is part of the standard.

Well, a development of the STL is indeed part. The original STL still
exists and is separate from the standard.
Is STL a part of C++ language?

No, not if you define the C++ language as it is defined in clause 1.5/1
of the C++ standard.

Tom
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,836
Latest member
login dogas

Latest Threads

Top