A couple things to keep in mind, in addition to what Rik has said:
A shotgun mic is super-cardioid, meaning it has a very narrow field of pickup, and is designed to reject noise coming from the sides and rear. It can be mounted on a hand grip and aimed at the actor's mouth by a person standing off camera, in which case you would not need a boom.
What you need to keep in mind, however, is that there may be other sounds occurring behind the actor - such as automobile traffic, for example - which the mic will also pick up. This will reduce your signal/noise ratio as described by Rik.
One of the many reasons mic's are mounted on boom poles is because they can be held above the actor and aimed downward. That way, the only background noise in its field of pickup is whatever is going on below the actor, usually limited to footsteps and other such noises -- much easier to deal with than traffic hiss.
For tight shots, the boom can also be held below the frame with the mic pointed upward. This works fine until an aircraft passes overhead, in which case the engine noise will dominate the track.