Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Mnemonics for cdict and sdict #704

Merged
merged 1 commit into from
Mar 21, 2022
Merged

doc: Mnemonics for cdict and sdict #704

merged 1 commit into from
Mar 21, 2022

Conversation

vain
Copy link
Member

@vain vain commented Feb 21, 2022

IMHO, cdict and sdict are not such great names. 🥴 It is not obvious what they mean. In the beginning, I thought cdict meant “current dict” and sdict meant “should (be) dict”, which is the wrong way around. I heard from other people that they mix up the dicts very often.

So, apparently cdict stands for “config dict”, so it’s a dict describing the configuration in your repo. Whereas sdict stands for … what does it stand for? 🥴 If thought it was “statedict”, but the docs start with:

To represent supposed vs. actual state, BundleWrap uses statedicts.

So, both cdict and sdict are “statedicts”? What’s sdict then?

I still went with “_s_dict stands for state dict”, because this makes sense in the context of the sentence.

(If I were to choose new names, I’d go with state_on_node instead of sdict and state_as_configured instead of cdict.)

@trehn trehn merged commit 567b5f0 into main Mar 21, 2022
@trehn trehn deleted the pho-cdict-sdict-mnemonics branch March 21, 2022 14:09
@trehn trehn mentioned this pull request Mar 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants