3 ms·
"Part of the language" means that the language's syntax directly allows you to do a thing, while "in the standard library" means that the functionality is inclu
by thomascgalvin 7y ago
"Part of the language" means that the language's syntax directly allows you to do a thing, while "in the standard library" means that the functionality is included with all (or at least most) versions of the language, but the language syntax doesn't provide the feature directly.
For example, take dictionaries (or maps). It lets you use a key (like "bob") to look up a value (like "555-555-1234" or "bob@spam.email").
Dictionaries are built into the language in Python, so to do the above, all you'd have to type is:
phones = { "bob": "555-555-1234" }
In Java, maps are part of the standard library. They're there, but you have to import them:
import java.util.*
Map<String, String> phones = new HashMap<>();
phones.put("bob", "555-555-1234");
The main difference is that features in the standard library can be written in the language itself. Java's Map classes are written in Java, while Python's dictionary utilities are written in C.
Other than that, the difference is largely semantics.