Closed simonpcouch closed 6 days ago
Currently:
.pal_add()
: Registers an available role in the pal environment. Maybe for use by developers. .pal_init()
: Actually creates a Pal object. Not intended for use by users..pal_new()
: Makes an appropriately-named .md
file in the pal directory (that will be registered on package load). Definitely user-facing.😵💫
Kinds of things:
Pal
object.pal_env
.pal_env()
. (These may not be an actual thing on their own, though?)Actions common to two or more of those things:
.pal_add()
, .pal_add_dir()
, .pal_new()
, .pal_init()
).pal_remove()
, maybe should be things that undo *add_dir()
and *new()
)list_pals()
, could also be items in the pal directory)Any of these could be common prefixes/suffixes.
Proposal:
register_*
: role()
(currently .pal_add()
), dir()
(currently .pal_add_dir()
)unregister_*
: role()
(currently .pal_remove()
), dir()
(no such function yet--calls .pal_remove()
on elements of the directory)list_*
: roles()
(current unexported list_pals()
), dir()
(no such function yet--lists .md
files in the directory)prompt_*
: new()
(currently .pal_new()
--new file in the directory), delete()
(no such function yet).The word for "an element of the directory" is a "prompt," and the verbs that happen to that file (creation or removal) are generally not shared with other kinds of things in the package. The assertion then is, I guess, a "prompt" is different from its constituent pieces (role, interface, prompt text).
With a separate .init_pal()
and .init_addin()
for developers only.
Weekend time—maybe this will feel clearer on Monday.
Currently, the namespace and documentation use "pal", "role" and "prompt" relatively interchangably, and have various meanings of "add"/"initialize"/"new". This is probably pretty confusing at this point.