Sending all your workers to try to kill a scout; even if it's already in your mineral line, will probably put you down more than the 50 minerals your opponent lost, as that could be 5+ seconds times 10-15 workers. At 43 minerals/worker/minute, that's barely break even, plus you might be losing the opportunity cost of spending your APM elsewhere.
So there is no good answer to this question, or it would already appear in the larger build order questions on this site. Unlike the early game (which is well defined) mid to late game doesn't have an easy answer, and anyone who gives you a BO past 20 is a snake oil sales man.
Even in the Zerg question you linked the answer was: What ever feels best
.
Let's look at some of the basic Protoss builds and how they progress:
4 Gate
Usually this build is very all-in, and you're banking on winning early. However, if you do enough economic damage with a 4 Gate, but don't win you can still be at an advantage. At this point if you pressure more you're going to end up against a higher tech opposing force and probably lose, so you can expand here and maybe add on a Robo or two more Gateways.
3 Gate
One of the great things people like to do with 3 Gate is provide pressure so that they can expand. This sets them up with a nice little force as they transition into the mid game. Once expanding there are some people who like to progress to 5 Gate + Robo, or 3 Gate + Double Robo, or even (recently) 3 Gate + Double Starport. There is even a nice 4 Gate + Robo to provide pressure so that Protoss can take a third expansion.
You probably notice a number of trends between these two builds, even though I picked two builds that could not be more different there were a number of important ideas:
- Your Production must be proportional to your Income. If you have less production than your income you need to have a plan for it (eg. setting up to expand). If you have more production than your income you need to be aggressive
- Don't over commit. When you're ahead, your number 1 priority should be to get more ahead (ie. expand)
- While you always need to tech (ie. Red Queen Hypothesis) teching takes time, so don't forget that in your calculations.
Now you'll notice that a lot of what's being discussed is Income vs Production and there are a couple tools you can use to help you out:
Remember: To get good at Starcraft you need to get good at Execution and Decision Making, not get good at following a road map.
Best Answer
So, I saw iNcontroL do this on his stream last night and I wish I had captured it for you because it really illustrates why this is such an important move: It controls the point of attack.
History
Back in Broodwars it was very common for your buildings to form a nice arc in front of your mineral line. The reason being that back in those days, every race had powerful melee and ranged units very early on. As a result, the arc allowed a player with ranged units to control where the opponent's melee units would attack in an artificial choke.
Starcraft 2 differs from Broodwars in a number of important ways: Smaller ramps at all naturals, mean you have a natural choke at every main base. Additionally, smaller bases mean that its easier to use buildings to create a wall to your natural choke, or from that choke to your natural expansion. This creates the line phenomena you observed, which has replaced the traditional arc
XvZ
The reason you see players do this largely against Zerg (and less so against other races) is because the balance of Ranged/Melee is now distinct amongst the races. Terran have a fairly ubiquitous ranged early army, where as Zerg's army tends to be almost always Melee (or short ranged) early on. Though some players would rather opt for a Wall-In, that has disadvantages, and often is not practical for expansions. As a result, it is often a better idea to build your buildings in a line (especially warp gates, where it doesn't matter where you put them).
Control
Finally, let's get to the reason that building these great walls is a good idea. If you have a range advantage on your opponent (or even if you both have a lot of short range), then if he attempts to bust your wall, you can harass him without taking damage to your army (your wall absorbs it instead). Most enemies will almost immediately realize why this is disadvantageous and withdraw. For them to attack you, they're forced to run around the wall (sometimes taking damage in the process), and engage at an artificial choke point. The Choke has long been known to give an advantage to the force with superior range, and since many natural expansions lack a choke, this artificial choke gives you a new advantage.
Summary
Whether or not you choose to wall-in, its important to know why you opponent might, and understand what its trying to accomplish. Usually the advantage provided by these walls starts to disappear in the mid-game, as players gain access to more ranged units and people start putting their army in front of their wall.
P.S.
Its worth noting that recently a number of Zerg players have shifted to what is called a high economy baneling bust. This is a move specifically targeted at these kinds of walls (and more general wall-ins). This utilizes an unusually high number of Banelings to break the wall, followed up by rushing Speedlings into the natural Mineral line. As a result, its important you keep your army at the part of the wall closest to the enemy, so you can catch this bust in action, and only move towards the choke when your enemy does.