Naw. Far as I know the formation (in post-medieval European use anyway) dates back to Late Middle Ages pikemen, who formed into huge dense blocks with the missile troops forming an outer layer. The practice was for the missile troops to take cove under the leveled pikes when beset by cavalry and fire point-blank, or move out of the way and provide support fire when clashing with other infantry. Such a formation could at least in principle fight simultaneously in every direction. The core of the square was where the halberds and two-handed swords went into (true greatswords went into the front ranks to hack up the enemy pike-wall), who moved in to exploit any breaches in the opposite formation and countered any breaches in their own ranks.

The later hollow square was a defensive anti-cavalry formation which utilized volley fire and bayonets (plus flanking fire from the regimental guns, which went into the corners) to keep the horsemen at bay and deny outflanking, formed out of the thin firing lines the infantry normally fought in. It was apparently extremely effective in its primary purpose, but apparently horribly vulnerable to enemy artillery and AFAIK none too good against infantry, and thus only adopted if there was a pressing need to.