Skip to content
This repository has been archived by the owner on Nov 14, 2020. It is now read-only.

any way to support older shells? #39

Open
ritschwumm opened this issue Dec 8, 2014 · 2 comments
Open

any way to support older shells? #39

ritschwumm opened this issue Dec 8, 2014 · 2 comments

Comments

@ritschwumm
Copy link

i've been toying with a similar idea, but due to portability issues, i'd not want to depend on bash v4. ideally, plain bourne shell would be nice - but even some older bash version so i don't have to install third-party software on the mac would be nice.

so, where does gherkin depend on features only supported in bash v4?

@quoll
Copy link
Collaborator

quoll commented Dec 8, 2014

I feel your pain. I'm on a Mac as well. Bash 4 was easy to install, but it kind of defeats the purpose of Gherkin if you need to install software to make it work.

Gherkin's entire memory-management is based on mapping strings (actually, they're more like strings that hold binary data) to data. i.e. associative arrays. These were introduced in Bash4.

I haven't looked for a while, so there may be things I'm forgetting, but IIRC the main reason for the binary data is to encode the datatype. It might be possible to provide each data type with its own numerically indexed array, but this would need a major rewrite.

@ritschwumm
Copy link
Author

hm... as long as the number of data types is known up front, it could be possible to encode the type in the last few bits of an index into a single array.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants