5. The Standard Library
Som's standard library provides modules with values and types core to Som, both implemented natively or in C. Some of these modules provide functionality for accessing services "outside" of Som, such as I/O, while other modules implement trivial types such as List
and Option
.
Currently, Som's standard contains the following modules:
io
for file I/Olist
for the list type and related functionsops
for aliasing builtin operatorsprelude
for including basic featuresptr
for the pointer type and related functionsstr
for the string type and related functionstypes
for aliasing common primitive types
The standard library's runtime implementation is mostly in C and is distributed in the dynamic library libsom.so
on Linux and MacOS and in som.dll
on Windows. When using the standard library the final executable has to be linked to this library, which is normally done automatically by the compiler. Any library or program extending- or using Som's standard library outside of Som has to link to the dynamic library manually.