I submitted this to Tech support and received the reply that the behavior is caused by the fact that AssociateTo has attribute HoldFirst, so the expression is sees is not an association. The reply recommended Append as a work-around. (Which I had already found.)
However, if HoldFirst is the problem, then I would think that Evaluate would clear it: "Evaluate[expr] causes expr to be evaluated even if it appears as the argument of a function whose attributes specify that it should be held unevaluated." However, it has no effect, as seen in the attached associations-evaluate.nb.
I have been continuing to try to make use of the new Dataset functionality, which is supposed to "support an unprecedentedly flexible and general approach to structured datasets." It has been very frustrating. Attached is another notebook (associations3.nb), in which I try to construct a structured dataset, and then access it through its keys. Nothing seems to work. I can ask for a list of the keys, see that they are there, but when I try to use one, I get key missing. It is very possible, even probable, that my syntax is incorrect. But I have been through the documentation over and over -- it doesn't help that the descriptions of dataset functionality is distributed across the various overloaded operators.
If anyone here can offer insight I would really appreciate it.
And Bruce, Sean, Daniel: In this forum, questions on Associations and Datasets generally go unanswered. Is it possible you might encourage one of your colleagues from that part of the effort to put in an appearance?
Attachments: