You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
since ObjIds are not typed, it might make API easier to read if actions are named based on type they can happen to. Right now some are, some are not. And it gets a little confusing since you have to switch on prop for some to determine what kind of object you are working with. So maybe more consistent would be action names:
MapPut
MapDelete
MapConflict
ListSplice
ListPut
ListConflict
TextSplice
TextMarks
CounterIncrement
The text was updated successfully, but these errors were encountered:
The context is that I'm using patch events to update my internal application model.
I know the schema that my application model has encoded to automerge, but I don't really know what automerge will be sending back to me (maybe old app version, maybe buggy peer, etc). So when processing patches I want types to be pretty clear ... so that I can be sure I'm patching the correct application model object.
And I would like to highlight that I really have no strong opinion here, except that some hinting of type in naming would be very welcome. I change my mind every few seconds on the exact form that should take.
After trying it out and living with the revised names a bit, while keeping the original functional, I think the maintenance overhead of the revised naming wasn't likely worth the effort, especially with nobody else really chiming in. So for this, I'm going to close it down with an explicit intention to keep the API as it is, even with the potential confusion points.
from @jessegrosjean in Discord chat:
since ObjIds are not typed, it might make API easier to read if actions are named based on type they can happen to. Right now some are, some are not. And it gets a little confusing since you have to switch on prop for some to determine what kind of object you are working with. So maybe more consistent would be action names:
The text was updated successfully, but these errors were encountered: