\label{doc_api_review_core_keyCmp_md_md_doc_api_review_core_keyCmp}%
\Hypertarget{doc_api_review_core_keyCmp_md_md_doc_api_review_core_keyCmp}%

\begin{DoxyItemize}
\item start = 2021-\/03-\/07 17\+:40
\item end = 2021-\/03-\/07 17\+:55
\item reviewer = Stefan Hanreich \href{mailto:stefanhani@gmail.com}{\texttt{ stefanhani@gmail.\+com}}
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md726}{}\doxysection{Signature}\label{doc_api_review_core_keyCmp_md_autotoc_md726}
{\ttfamily int \mbox{\hyperlink{group__keytest_gaf6e66e12fe04d535a5d1c8218ced803e}{key\+Cmp(const Key $\ast$k1, const Key $\ast$k2)}}}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md727}{}\doxysection{Checklist}\label{doc_api_review_core_keyCmp_md_autotoc_md727}
\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md728}{}\doxysubsubsection{Doxygen}\label{doc_api_review_core_keyCmp_md_autotoc_md728}
(bullet points are in order of appearance)


\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} First line explains briefly what the function does
\item \mbox{[} \mbox{]} Simple example or snippet how to use the function ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} move last example below brief explanation
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Longer description of function containing common use cases ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add description about behavior of namespace comparison
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} Description of functions reads nicely
\item \mbox{[} \mbox{]} {\ttfamily @pre} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @post} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @invariant} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} {\ttfamily @param} for every parameter
\item \mbox{[} \mbox{]} {\ttfamily @return} / {\ttfamily @retval} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} remove {\ttfamily @return} in favor of {\ttfamily @retval}\textquotesingle{}s? ~\newline

\item \mbox{[} \mbox{]} add {\ttfamily @retval} for k1 $>$ k2 ~\newline

\item \mbox{[} \mbox{]} add {\ttfamily @retval} for k1 == k2 ~\newline

\item \mbox{[} \mbox{]} add {\ttfamily @retval} for k1 $<$ k2
\end{DoxyItemize}
\item \mbox{[} \mbox{]} {\ttfamily @since} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} {\ttfamily @ingroup}
\item \mbox{[}x\mbox{]} {\ttfamily @see}
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md729}{}\doxysubsection{Naming}\label{doc_api_review_core_keyCmp_md_autotoc_md729}

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} Abbreviations used in function names must be defined in the \mbox{\hyperlink{doc_help_elektra-glossary_md}{Glossary}} ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} Define Cmp or write it out?
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} Function names should neither be too long, nor too short
\item \mbox{[}x\mbox{]} Function name should be clear and unambiguous
\item \mbox{[}x\mbox{]} Abbreviations used in parameter names must be defined in the \mbox{\hyperlink{doc_help_elektra-glossary_md}{Glossary}}
\item \mbox{[} \mbox{]} Parameter names should neither be too long, nor too short ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} k1 -\/$>$ key1 / this -\/ \mbox{[} \mbox{]} k2 -\/$>$ key2 / that
\end{DoxyItemize}
\item \mbox{[}x\mbox{]} Parameter names should be clear and unambiguous
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md730}{}\doxysubsection{Compatibility}\label{doc_api_review_core_keyCmp_md_autotoc_md730}
(only in PRs)


\begin{DoxyItemize}
\item \mbox{\hyperlink{doc_dev_symbol-versioning_md}{Symbol versioning}} is correct for breaking changes
\item ABI/\+API changes are forward-\/compatible (breaking backwards-\/compatibility to add additional symbols is fine)
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md731}{}\doxysubsection{Parameter \& Return Types}\label{doc_api_review_core_keyCmp_md_autotoc_md731}

\begin{DoxyItemize}
\item Function parameters should use enum types instead of boolean types wherever sensible
\item \mbox{[}x\mbox{]} Wherever possible, function parameters should be {\ttfamily const}
\item \mbox{[}x\mbox{]} Wherever possible, return types should be {\ttfamily const}
\item \mbox{[}x\mbox{]} Functions should have the least amount of parameters feasible
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md732}{}\doxysubsection{Structural Clarity}\label{doc_api_review_core_keyCmp_md_autotoc_md732}

\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} Functions should do exactly one thing
\item \mbox{[}x\mbox{]} Function name has the appropriate prefix
\item \mbox{[}x\mbox{]} Order of signatures in kdb.\+h.\+in is the same as Doxygen
\item \mbox{[}x\mbox{]} No functions with similar purpose exist
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md733}{}\doxysubsection{Memory Management}\label{doc_api_review_core_keyCmp_md_autotoc_md733}

\begin{DoxyItemize}
\item \mbox{[}x\mbox{]} Memory Management should be handled by the function wherever possible
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md734}{}\doxysubsection{Extensibility}\label{doc_api_review_core_keyCmp_md_autotoc_md734}

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} Function is easily extensible, e.\+g., with flags ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} add flags for comparing specific parts of the key
\end{DoxyItemize}
\item \mbox{[} \mbox{]} Documentation does not impose limits, that would hinder further extensions
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md735}{}\doxysubsection{Tests}\label{doc_api_review_core_keyCmp_md_autotoc_md735}

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} Function code is fully covered by tests ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} L517 ~\newline

\item \mbox{[} \mbox{]} L558
\end{DoxyItemize}
\item \mbox{[} \mbox{]} All possible error states are covered by tests ~\newline

\begin{DoxyItemize}
\item \mbox{[} \mbox{]} test key with same name, but different owners
\end{DoxyItemize}
\item All possible enum values are covered by tests
\item \mbox{[}x\mbox{]} No inconsistencies between tests and documentation
\end{DoxyItemize}\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md736}{}\doxysection{Summary}\label{doc_api_review_core_keyCmp_md_autotoc_md736}
move implementation out of \mbox{\hyperlink{keyset_8c}{keyset.\+c}} ?\hypertarget{doc_api_review_core_keyCmp_md_autotoc_md737}{}\doxysection{Other Issues discovered (unrelated to function)}\label{doc_api_review_core_keyCmp_md_autotoc_md737}
