On Fri, Mar 13, 2020 at 11:59 AM Arthur A. Gleckler <xxxxxx@speechcode.com> wrote:

A dictionary isn't a more uniform API.  It just moves the naming problem from the record's slots to the dictionary's keys.

I'm saying it's more uniform to have just a dictionary or just slots than to have both, as was being suggested some ways back.
 
I don't understand the "pointlessly mutable" comment.  Records can have immutable slots, but dictionaries typically can't.

What I meant was that there is no easy-to-use constructor for a large record (unless you have keyword arguments), as the BOA constructor is illegible even with just 7 arguments.  So you end up constructing an empty record and then mutating each slot so it contains what you want. And then you think, well, why not reuse this object?  And then you're in trouble.

So alternatively you write a user-level constructor that fakes keywords by passing multiple arguments (a plist) or an alist or some other dictionary.  And when you have gotten to there, why not just use the dictionary in the first place?



John Cowan          http://vrici.lojban.org/~cowan        xxxxxx@ccil.org
Knowledge studies others / Wisdom is self-known;
Muscle masters brothers / Self-mastery is bone;
Content need never borrow / Ambition wanders blind;
Vitality cleaves to the marrow / Leaving death behind.    --Tao 33 (Bynner)