https://github.com/meithecatte/bdsm
Bash Data Structures & Miscellanea
https://github.com/meithecatte/bdsm
Last synced: 4 days ago
JSON representation
Bash Data Structures & Miscellanea
- Host: GitHub
- URL: https://github.com/meithecatte/bdsm
- Owner: meithecatte
- License: other
- Created: 2024-12-25T21:41:59.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-12-26T09:54:23.000Z (about 1 year ago)
- Last Synced: 2025-12-27T11:58:51.638Z (about 2 months ago)
- Language: Shell
- Size: 2.93 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Bash Data Structures & Miscellanea
BDSM is a library for those insane enough to use bash as a general-purpose
programming language.
## Notes on the coding style
Apart from strings, bash only has two data structures: arrays (indexed by
integers), and associative arrays (indexed by strings). This library does
not use normal arrays whatsoever, as they are backed by linked lists and
therefore have terrible performance characteristics. Instead, you will
see associative arrays that happen to use (stringified) integers as keys.
If a function takes a reference as an argument, you will see all local
variables start their name with `_`. This is to reduce the chance of a
naming conflict making the reference resolve to the wrong variable.
As such, it is Very Much Not Recommended to pass variables that themselves
start with `_` as reference.