Cool! So, to follow up on my newbie assessment from a few days ago: How did you handle the problem of dict in dict? Maybe you've written that above, but explain like I'm 5 ;-)
Cheers! Raoul Le ven. 11 févr. 2022 à 23:52, 'Pascal Jasmin' via Programming < programm...@jsoftware.com> a écrit : > https://github.com/Pascal-J/kv/blob/main/kv.ijs > > follows closely to spec I proposed earlier this week. > > > intended for coinsert 'kv' into any other locale. (should be) safe for > coinsert_z_ 'kv' (base needs extra coinsert 'z' call) > > unique key implied access even when non-unique keys permitted. > > create(bulk), add, del, update/set all have versions to allow/avoid > duplicates. 1 suffix permits duplicates > > optimized for bulk operations, where arguments to functions are either a > list of keys, or a kv dictionary. > > kv dictionary always y argument. modifications return copies. > > A DSL is provided to permit one line string descriptions of the simplest > dictionaries. > > Non-unique key implementation can still provide unique key expected > behaviour. add appending a duplicate value creates an undo operation when > del deletes the last value. > > kvadd1 instead of kvadd > > Multiple internal keys also permit using kv with meaningful order and > /.(key) "applications" and classifiers. > > tosym replacement for s: cut instead of leading delimiter. tosym on > symbols returns the symbols instead of error. > > values kept native numeric or string (padded) if possible. Otherwise boxed. > > values can hold other kv structures, and so may wish to hold 3 independent > dictionaries for each data type: numeric, string, boxed. > > kv (get) function returns values only for keys found, returns i.0 if no > keys found. > > adding or updating unboxed values will promote to boxed if internal values > are boxed. > > deep operations are supported, where typical kv right arguments (set add) > will when provided with nested k1;(kv) : > > will modify kv deeply with (k0 kvbulk (keys;vals) set kvdata will set at > k0 level. > > get/del can access/del at infinte depth. > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm