I can speak to if (x) { ... } as I was one of the drivers to make length(x) > 1 an error. It had been a warning since 2002 (saying only x[1] was used), and we made a serious push for escalating that to an error in 2017. It became a strict error in R (>= 4.2.0) [2022-04-22]. You can read about this journey in https://github.com/HenrikBengtsson/Wishlist-for-R/issues/38 and https://blog.r-project.org/2018/10/12/conditions-of-length-greater-than-one/index.html.
1/
Economist. Antitrust policy; industrial organization; history of economics
xmpp: mattp@sendero.snikket.chat