niieani / bash-oo-framework

Bash Infinity is a modern standard library / framework / boilerplate for Bash
https://github.com/niieani/bash-oo-framework/discussions
MIT License
5.57k stars 248 forks source link

[question] few questions while reading README.md #63

Open Cj-bc opened 5 years ago

Cj-bc commented 5 years ago

hello, I'm really interested in this project, and respect it. I'm trying translating the README.md into Japanese. While this, I got some questions( might be a fool one) so can I ask some? (I'm not a native English speaker, I'm still learning English at school. So, I apologize that there might be some rude words/sentences)

1. the meaning of lossless dumping

In Passing arrays, maps and objects as parameters section:

The Variable utility offers lossless dumping of arrays and associative array (referred here to as `maps`) declarations by the use of the `@get` command.

I couldn't get the meaning of lossless dumping. I googled a lot, but there's no info... Is it almost the same meaning of 'dumps perfect copy of arrays' ?

2. what's the meaning of 'groups'?

In the README.md, Standard Library section, there's such comments

# lists all matches in group 1:
$var:matchGroups every 2 1

but based on my codereading, I couldn't understand what the 'group 1' is. what I got is "every method choose every $everyth value starting from $startingIndex. and return it as an array"

## group 0, match 1
$var:someString match '([0-9]+) [a-zA-Z]+' 0 1

this also confuse me...

Functional/operational chains

is it a word of functional languages?


I'm not sure those are because I don't know other meaning of 'group', or I don't know C#/Java/javaScript languages...

I'm glad if you answer me, thanks.

niieani commented 5 years ago

Hi @Cj-bc these are some good points I could improve on in the README.

1. "lossless dumping"

in this context means the capturing of the descriptor of any given variable, so that it can be recreated in any context.

The "dump" is the result of the @get operation.

I'll have to get back to you about 2 and 3 as I don't have time to make up good examples for this now. Thanks for understanding!

Cj-bc commented 5 years ago

Thank you for your answer!! I'm really happy whenever I receive the reply.I'm glad if you reply me on your pace.

Now, I understand what the ' lossless dumping' is. I'll read codes of @get for more understanding.