निरंजन
We have functions to append to a variable, e.g., `\tl_put_right:Nn` or `\str_put_right:Nn`. Why is such a function not available for the properties stored with the `l3prop` module?
I think the question says it all. Currently I do something like following:
```
\documentclass{article}
\ExplSyntaxOn
\cs_new_protected:Npn \__prop_append:n #1 {
\group_begin:
\tl_clear:N \l_tmpa_tl
\tl_clear:N \l_tmpb_tl
\prop_get:NnN \g_tmpa_prop { test } \l_tmpa_tl
\quark_if_no_value:NTF \l_tmpa_tl {
\tl_set:Nn \l_tmpb_tl { #1 }
} {
\tl_set:Ne \l_tmpb_tl {
\l_tmpa_tl, #1
}
}
\prop_gput:NnV \g_tmpa_prop { test } \l_tmpb_tl
\group_end:
}
\__prop_append:n { foo }
\__prop_append:n { bar }
\prop_show:N \g_tmpa_prop
\ExplSyntaxOff
\begin{document}
\end{document}
```
But it would have been better if we had a function for that. I am guessing there is some reason why it was not added in the first place. I am curious why.
Top Answer
Joseph Wright
Simply, because it's not a core feature of properties that's been required by the team. A property list is a list of keys/values. The fact that you might want to store things that are extended is secondary - at any one time, each key has an exact value.
Of course you may want to extend what is in a property list, but that's quite easy with get/add/store (I do that in `siunitx` for example). But this is not a 'central' feature, and there's no obvious performance gain from doing it in `expl3` core rather than programmers sorting what they need themselves.