Most languages do this pretty well. ruby and rust package managers store all past versions of packages so its trivial to get the same setup again. Its C where the problems come from. Finding the right packages to build something is quite a task since every distro calls them different things and has different versions and only keeps 1 version at a time.