Re: Request: Standard hashmaps in sh

2023-12-27 Thread David A. Wheeler via austin-group-l at The Open Group
> On Dec 27, 2023, at 2:03 PM, Chet Ramey via austin-group-l at The Open Group > wrote: > > On 12/27/23 11:26 AM, Andrew Pennebaker via austin-group-l at The Open Group > wrote: >> Many programs depend on hashmaps in order to work. >> awk is not an answer. >> The lack of hashmaps forces

Re: Request: Standard hashmaps in sh

2023-12-27 Thread Oğuz via austin-group-l at The Open Group
On Wednesday, December 27, 2023, Andrew Pennebaker < andrew.penneba...@gmail.com> wrote: > Simply acknowledging bash associative array syntax, would instantly > improve the scalability of sh scripts. > .. in theory. Other shells would have to implement it first. Considering some of them don't

Re: Request: Standard hashmaps in sh

2023-12-27 Thread Chet Ramey via austin-group-l at The Open Group
On 12/27/23 11:26 AM, Andrew Pennebaker via austin-group-l at The Open Group wrote: Many programs depend on hashmaps in order to work. awk is not an answer. The lack of hashmaps forces people to use less efficient algorithms, such as linear search. The bash family implements it. Simply

Re: Request: Standard hashmaps in sh

2023-12-27 Thread Andrew Pennebaker via austin-group-l at The Open Group
Many programs depend on hashmaps in order to work. awk is not an answer. The lack of hashmaps forces people to use less efficient algorithms, such as linear search. The bash family implements it. Simply acknowledging bash associative array syntax, would instantly improve the scalability of sh

Re: Request: Standard hashmaps in sh

2023-12-26 Thread Oğuz via austin-group-l at The Open Group
On Wednesday, December 27, 2023, Andrew Pennebaker via austin-group-l at The Open Group wrote: > I am currently using dynamically named variables in order to implement > logical hashmaps in pure, POSIX sh. > Why? The standard hashmap language is AWK and it's available on every POSIX-compliant

Request: Standard hashmaps in sh

2023-12-26 Thread Andrew Pennebaker via austin-group-l at The Open Group
Hi, I am currently using dynamically named variables in order to implement logical hashmaps in pure, POSIX sh. The entries share a common, application specific prefix to mitigate collisions with other environment variables. However, the hacky syntax I am using for this, involves eval commands.