TickTick icon indicating copy to clipboard operation
TickTick copied to clipboard

length is unintuitively recursive

Open kristopolous opened this issue 13 years ago • 4 comments

In addressing #17 I ran into this

database = [ { "artist": "Ludwig Van Beethoven", "title": "Moonlight Sonata" }, { "artist": "Johann Pachelbel", "title": "Canon in D Major" }, { "artist": "Johann Sebastian Bach", "title": "Air on a G String" } ] ``

echo database.length()

which emitted 6. In the JS world we'd probably think this to be 3.

kristopolous avatar May 26 '12 02:05 kristopolous

Indeed :+1:

Any progress on this, eh? It's such a promising little pet project you have here.. just have some quirks to work out ;)

kaos avatar May 24 '13 09:05 kaos

How about using bash arrays instead of name mangling variables..?

kaos avatar May 24 '13 10:05 kaos

got around to try to fix it, in pull #28 .. :p

kaos avatar May 28 '13 20:05 kaos

Sorry to revive such an old thread; I just have to make this clear to first-time visitors:

The commit above (that Fixes #19) was merged into a branch bash-arrays. So this issue's open because it's still not fixed on the master branch.

alexdantas avatar Jun 16 '14 05:06 alexdantas