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
The interpret() function returns something called a service everywhere else in the docs.
When I was first trying to learn Robot to use in a project of mine, it took me a couple of re-reads for this to sink in. That’s because the other functions return things that match the function name: createMachine() returns a machine, transition() returns a transition, state() returns a state, and so on.
(I don’t normally feel comfortable requesting a change to an API name. However, since Robot is still at version 0.2.x, I suppose this is the appropriate time (before v1.x) to do so.)
Consider renaming interpret() to createService(). This would make the function match what we call the thing it returns.
It would also make the only 2 top-level functions in Robot start with “create…”. That would be a nice cue that both functions are at that level.
The text was updated successfully, but these errors were encountered:
The
interpret()
function returns something called a service everywhere else in the docs.When I was first trying to learn Robot to use in a project of mine, it took me a couple of re-reads for this to sink in. That’s because the other functions return things that match the function name:
createMachine()
returns a machine,transition()
returns a transition,state()
returns a state, and so on.(I don’t normally feel comfortable requesting a change to an API name. However, since Robot is still at version 0.2.x, I suppose this is the appropriate time (before v1.x) to do so.)
Consider renaming
interpret()
tocreateService()
. This would make the function match what we call the thing it returns.It would also make the only 2 top-level functions in Robot start with “create…”. That would be a nice cue that both functions are at that level.
The text was updated successfully, but these errors were encountered: