Standard Library - Philosophies

Philosophies

Philosophies of standard library design vary widely. For example, Bjarne Stroustrup, designer of C++, writes:

What ought to be in the standard C++ library? One ideal is for a programmer to be able to find every interesting, significant, and reasonably general class, function, template, etc., in a library. However, the question here is not, "What ought to be in some library?" but "What ought to be in the standard library?" The answer "Everything!" is a reasonable first approximation to an answer to the former question but not the latter. A standard library is something every implementer must supply so that every programmer can rely on it.

This suggests a relatively small standard library, containing only the constructs that "every programmer" might reasonably require when building a large collection of software. This is the philosophy that is used in the C and C++ standard libraries.

By contrast, Guido van Rossum, designer of Python, has embraced a much more inclusive vision of the standard library; in the Python tutorial, he writes:

Python has a "batteries included" philosophy. This is best seen through the sophisticated and robust capabilities of its larger packages.

Van Rossum goes on to list libraries for processing XML, XML-RPC, email messages, and localization, facilities that the C++ standard library omits. This other philosophy is often found in Scripting languages (as in Python or Ruby) or languages that use a Virtual machine, such as Java or the .NET Framework languages. In C++, such facilities are not part of the standard library, but instead other libraries, such as Boost.

Read more about this topic:  Standard Library

Famous quotes containing the word philosophies:

    I wish I could write a beautiful book to break those hearts that are soon to cease to exist: a book of faith and small neat worlds and of people who live by the philosophies of popular songs.
    Zelda Fitzgerald (1900–1948)