I’ll illustrate a little vignette of how global environment bloat becomes painful for new users:
- Make a few simple plots based on a tutorial using a handful of packages installed in the global environment
- As the project’s scope expands, gradually add packages
- Perform a throwaway analysis for a separate project that requires one or two more packages (also added to the global environment)
- A third project appears. This time, two of the necessary packages are incompatible, but a fix is available on
#master - This breaks something deep inside the graphics stack for the first project
- [two hours of package resolution hell and refactoring just because the user wanted to make a plot]
All this pain would be avoided, of course, if users created a new environment for each project, but as multiple commenters have mentioned, the necessity of siloing projects is not drilled into new users who are happy to take the path of least resistance. The problem isn’t the existence of a persistent global environment, but rather that the global environment is the default. It shields new users from the complexity of Pkg, projects, manifests, environments, etc., but that debt can only be deferred for so long before it needs to be collected (with interest).