You raise good points. I’ll re-visit the examples in aTbRef.
The more Action code becomes like a language and less like scripting, the more—and more complex—the potential usage. At the same time Action code doesn’t give failure messages and logging intermediate stages of a process only gets one so far. An internal failure, i.e. where something which it seems should work, doesn’t, it is hard to investigate further. This makes for something of a headache when trying to document things!
For aTbRef, my notes always start with the—often very brief—announcements of new features. I work on the assumption that any code samples have been tested, though if I have time (and understand the use case) I will try and test myself. For code-related notes, I turn them into aTbRef’s own standardised syntax. The later might be verbose for expert coders, but feedback suggests its consistency does make it easier for non-coders to understand how to use action code.
As regards lists (Set, List, Dictionary) these are still semicolon-delemited strings—that should be one’s base assumtion. One of the reasons for the [ ]
listing syntax was to allow dictionaries (a list of key:value string) to have key values that are lists. Consider this dictionary:
$MyDictionary = dictionary("Types:fast;slow;Distance:234;"); // WRONG!!
//but
$MyDictionary = dictionary("Types:[fast;slow];Distance:234;");
//or - using newer {} dictionary markup
$MyDictionary = "{Types:[fast;slow];Distance:234;}";
// which for those who object to extra keystrokes is
$MyDictionary = {Types:[fast;slow];Distance:234;};
But, in the case of the altter there is no unambiguous statement as to the use of ‘bare’ [ ]
or { }
values. IOW, we assume the parser sees these as strings of a List† or Dictionary type. And yet, we don’t know because there is no release note to lean on, in terms of design intent.
It might be a while before I change existing aTbref notes in this context as updating one (now ambiguous) example for another doesn’t help. Some careful fine-grained testing is needed and I’m short on spare time ATM. If anyone does/has done tests in this area, by all means let me know (a PM or email is also fine) so I can update examples with confidence they are correct.
†. Although Tinderbox had Set-type before List-type, I think Sets are now better thought of as a special type of list, especially since v8 (v9?) actually started doing the long-forecast outcome of arbitrarily re-sorting the list order of Set items.