\label{doc_decisions_separate_key_name_md_md_doc_decisions_separate_key_name}%
\Hypertarget{doc_decisions_separate_key_name_md_md_doc_decisions_separate_key_name}%
 \hypertarget{doc_decisions_separate_key_name_md_autotoc_md2256}{}\doxysection{Problem}\label{doc_decisions_separate_key_name_md_autotoc_md2256}
Often a {\ttfamily Key} argument is used when you just need a key name. This is because with a {\ttfamily Key} we know the name is valid and we get an unescaped name. Using a {\ttfamily Key} here makes the API a bit confusing.

There could be a richer API for manipulating key names without relying on the escaped name (e.\+g. concatenating two full key names). With the current situation, all these functions would need to be part of the API for a key. Adding such functions to the key API is certainly not minimal.\hypertarget{doc_decisions_separate_key_name_md_autotoc_md2257}{}\doxysection{Constraints}\label{doc_decisions_separate_key_name_md_autotoc_md2257}
\hypertarget{doc_decisions_separate_key_name_md_autotoc_md2258}{}\doxysection{Assumptions}\label{doc_decisions_separate_key_name_md_autotoc_md2258}
\hypertarget{doc_decisions_separate_key_name_md_autotoc_md2259}{}\doxysection{Considered Alternatives}\label{doc_decisions_separate_key_name_md_autotoc_md2259}

\begin{DoxyItemize}
\item add separate {\ttfamily struct Key\+Name}
\end{DoxyItemize}\hypertarget{doc_decisions_separate_key_name_md_autotoc_md2260}{}\doxysection{Decision}\label{doc_decisions_separate_key_name_md_autotoc_md2260}
Continue keeping 3 classes\+: {\ttfamily Key}, {\ttfamily Key\+Set} and {\ttfamily KDB}.\hypertarget{doc_decisions_separate_key_name_md_autotoc_md2261}{}\doxysection{Rationale}\label{doc_decisions_separate_key_name_md_autotoc_md2261}

\begin{DoxyItemize}
\item A minimal {\ttfamily Key} ideally only consists of a key name and the goal is to keep {\ttfamily Key} small, so introducing {\ttfamily Key\+Name} would go the wrong direction.
\end{DoxyItemize}\hypertarget{doc_decisions_separate_key_name_md_autotoc_md2262}{}\doxysection{Implications}\label{doc_decisions_separate_key_name_md_autotoc_md2262}

\begin{DoxyItemize}
\item Thus, operations working on key names, directly use {\ttfamily Key} as argument.
\item The key name is actually, in every implementation, a plain string. This is also required, because implementations must use the same memory layout.
\end{DoxyItemize}\hypertarget{doc_decisions_separate_key_name_md_autotoc_md2263}{}\doxysection{Related Decisions}\label{doc_decisions_separate_key_name_md_autotoc_md2263}

\begin{DoxyItemize}
\item \mbox{\hyperlink{doc_decisions_null_md}{Null}}
\item \mbox{\hyperlink{doc_decisions_store_name_md}{Store the escaped and/or unescaped key name}}
\end{DoxyItemize}\hypertarget{doc_decisions_separate_key_name_md_autotoc_md2264}{}\doxysection{Notes}\label{doc_decisions_separate_key_name_md_autotoc_md2264}
Text partly copied from @kodebach \href{https://github.com/ElektraInitiative/libelektra/pull/4201\#pullrequestreview-840564988}{\texttt{ https\+://github.\+com/\+Elektra\+Initiative/libelektra/pull/4201\#pullrequestreview-\/840564988}} 