@hadleywickham As is weirdly common, I hit a use case for !!! right after I read this post. Saved me some headache. 🤓

FWIW, thoughts:

What you're focused on in this post is reduce-y stuff with lists. But the alternate approaches like `reduce()` and `do.call()` don't work in vector applications, like

fct_recode(x, !!!levels)

If you come up with some fancier approach to the `bind_rows()` situation, I'd hope it also applies to named vector situations.

@hadleywickham

I am more inclined to use, and teach, function wrappers with names instead of symbols.

To teach !!!, I'd have to get into why it's special and how !! is totally different but also not and none of them are the same as using ! multiple times on a Boolean etc etc.

So my ideal solution here would be essentially be a named function that is literally identical to !!! that just means "hey treat the elements of this object as separate arguments to the function".

@kellybodwin I’m not sure I fully buy that argument because <- doesn’t seem to cause that much confusion with < -

Follow

@hadleywickham @kellybodwin Not sure whether this matters, but coding typefaces that support ligatures (for example, Fira Code) further exaggerate the visual difference between <- and < -. The symbols that result from typing each respective expression are, I would argue, quite different. For that reason, I would contend that those symbols not causing confusion might, in some cases at least, be attributable to an exaggerated visual difference due to ligatures.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.