-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0e0481
commit abef7c4
Showing
2 changed files
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
MinAlertLevel = suggestion | ||
|
||
[*] | ||
BasedOnStyles = Vale |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
# Virtual Object | ||
|
||
Virtual objects are implemented as a string that contains some metadata and a reference to a variable. For example, in `$'\x1C\x1Dtype=array;&SUB_OBJECT'`, the metadata is `type=array`, and the reference is to the (global) variable `SUB_OBJECT`. Virutal objects always start with `$'\x1C\x1D`, to identify them amongst regular strings | ||
Virtual objects are implemented as a string that contains some metadata and a reference to a variable. For example, in `$'\x1C\x1Dtype=array;&SUB_OBJECT'`, the metadata is `type=array`, and the reference is to the (global) variable `SUB_OBJECT`. Virtual objects always start with `$'\x1C\x1D`, to identify them amongst regular strings | ||
|
||
The `type=<type>` may look redundant since the type can be checked without subshell creation with `${var@a}` or `${var@A}`. However, this only works on newer Bash versions. Additionally, it is faster to check the types when setting the object and then saving that data as a string, rather than re-checking the type on every access. Lastly, `bash-object` may be extended in the future to support custom objects, so a field for it in the meatdata is useful |