YAMLScript
YAMLScript. (YS) is valid YAML, however, it is not API compatible with YAML.
Blurb
Programming in YAML. Contribute to yaml/yamlscript development by creating an account on GitHub.
Summary
Garden stance: We assess YAMLScript for our estate.
Overview: All YS files must start with !yamlscript/v0/data, or a SheBang (#!). This will cause non-compliant parsers to fail, and instruct compliant ones on which language to use for the rest of the file.
Example Data
| |
will result in
| |
Example Program
| |
main is the entry point and all command line arguments are split as function arguments. Builtins like each, say, cond take zero or more arguments and perform work given by their object definition. User defined functions are called using ().
This is a functional language and thus the program and object definitions are unordered. For example in cond the “=>” string indicates the default case; it is only placed last as a convention. This also means that all conditions have to be fully evaluated before the default case can be chosen. Not usually a issue, but something to be aware of.
In paragraph the | indicates that the next block is text. The $ in the block is interpolation.
Details
Example Data
| |
will result in
| |
Example Program
| |
main is the entry point and all command line arguments are split as function arguments. Builtins like each, say, cond take zero or more arguments and perform work given by their object definition. User defined functions are called using ().
This is a functional language and thus the program and object definitions are unordered. For example in cond the “=>” string indicates the default case; it is only placed last as a convention. This also means that all conditions have to be fully evaluated before the default case can be chosen. Not usually a issue, but something to be aware of.
In paragraph the | indicates that the next block is text. The $ in the block is interpolation.