a programming language is only ever going to be as good as its standard library. try writing a c
program without <string.h>
, for instance . it’s not great.
amber’s standard library is not large — it’s only 24 commands, and some of those aren’t yet available in version 1.0 — but it provides a lot of the convenience functionality that we want when scripting. there’s string manipulation, array handling, some file access stuff. all of these functions are, under the hood, just bash commands, but they provide proven and convenient ways to do the things we want to do.
none of the standard library commands are covered in the official documentation. to find out what they do (or even that they exist), you need to read the source code. so, lets’ go over them here so we don’t have to do that.
Continue reading →