Standard library

The standard library of a programming language is the set of APIs and features that are provided by the language runtime. C, for example, has a very small standard library—as a low-level language, the number of features that it supports for every operating system is limited. Java, on the other hand, historically known for being heavy on memory and startup time, provides a massive standard library—including the Swing GUI described in Chapter 2, Graphical User Interface Challenges.

The size of the standard library is usually part of the trade-off when choosing a programming language. For performant native applications that start quickly, the number of built-in APIs is often small. When building with a higher-level language, developers typically expect a lot of supporting features and API packages—and this will usually come with a penalty in startup time or performance. The Go language attempts to provide a full standard library without any of the runtime penalties. This is managed through its cross-platform compilation and static linking, which includes all of the utilized features in the native binary being built. This means that the files are probably larger than programs compiled from C code and they may take longer to compile—but these one-time costs (building and downloading) enable the high performance of Go apps across all platforms.

The standard library included with Go includes powerful features across many areas, including cryptography, image manipulation, text handling (including Unicode), networking, HTML templating, and web service integration. You can read the full documentation at https://golang.org/pkg/#stdlib.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.136.17.139