Language Specification
Manuals for various features of the Bash++ language are provided in this section. The language specification is a work in progress, and is not yet complete. If you have any questions or suggestions, please feel free to open an issue on the GitHub repository.
These manuals are also available as part of the Bash++ compiler and can be accessed via man commands. For example, to view the manual for the @include directive, run: man bpp-include.
General
A Bash++ source file must be a valid UTF-8 encoded text file with Unix-style line endings (LF, \n). The file may optionally begin with a shebang line (e.g., #!/usr/bin/env bpp) to allow execution as a script. It is suggested to use the .bpp file extension for Bash++ source files, although not required.
In general, since Bash++ is a superset of Bash, the details of Bash syntax and semantics apply unless otherwise specified in the Bash++ documentation. All valid Bash scripts that do not contain unescaped AT symbols (@) are also valid Bash++ scripts with identical behavior. Any case in which there exists a deviation from Bash behavior that is not documented should be reported as a bug.
Contents
Classes
bpp-classes(3)
- @class
- Define a class
Delete
bpp-delete(3)
- @delete
- Delete an object
Dynamic Cast
bpp-dynamic-cast(3)
- @dynamic_cast
- Safely cast an object to a different type at runtime
Entities
bpp-entities(3)
- Entities
- Structural Units of Program Identity and Accessibility
Includes
bpp-include(3)
- @include
- Include a file in the current program
Language Interoperability
bpp-interoperability(3)
- Interoperability
- Interoperability with Bash Features
Methods
bpp-methods(3)
- @method
- Define a method for a class
New
bpp-new(3)
- @new
- Create a new instance of a class
Objects
bpp-objects(3)
- Objects
- Object-Oriented Programming in Bash++
Pointers
bpp-pointers(3)
- Pointer
- A pointer to an object
String Interpolation
bpp-string-interpolation(3)
- Interpolation
- Embedding expressions within string literals
Super
bpp-super(3)
- @super
- Change context to a parent class
Supershells
bpp-supershell(3)
- Supershell
- Capture the output of a command while allowing it to modify the environment
toPrimitive
bpp-toprimitive(3)
- toPrimitive
- Convert an object to a primitive type
Typeof
bpp-typeof(3)
- @typeof
- Determine the type of an object at runtime