Closed eyayaw closed 6 months ago
Hmm, that's actually a good point I had not considered.
I could potentially export aliases with the prefix, and then decide if we want to move there long term.
Let me think about it a bit.
I thought about this. The discoverability point is a good one, but the package only has a few functions, so it is trivial to look at the docs, or to type tinytable::
and then TAB in any editor to get a list of exported functions by completion.
I considered adding aliases to all functions, but this would double the number of exports and make the docs less readable.
I considered switching the order for all functions: group_tt()
->tt_group()
, style_tt()
->tt_style()
.
But this would be a major breaking change. Also, I'm not convinced that the argument in your link fully applies here. The major difference is that we are now thinking about a prefix that would apply to every single function of the package. That's what the namespace is for!
Finally, I think this is more readable:
tt(x) |>
group_tt() |>
style_tt()
thank this:
tt(x) |>
tt_group() |>
tt_style()
Sorry I didn't give you what you wanted, but feel free to open more feature requests and I promise I'll consider them seriously.
Thank you for considering it.
I am not sure whether the argument in the link is convincing. However, as you well know, there are several packages that follow such styles: stringi
, stringr
, ggplot2
(geom_*
, theme_*
), sf
, tmap
, etc. Regarding breaking changes, if you find the argument convincing, I think it is better to do it early rather than later.
Thanks for the nudge, but I won't change this.
Firstly, thank you for such a wonderful package.
While experimenting with it, I noticed that the tinytable functions are not easy to find because they are suffixed
_tt
rather than prefixed bytt_
. Is this a deliberate choice? I think it would be nice to prefix them withtt_
so that it is easier not only to find functions but also to leverage IDE's autocomplete feature.