Hemingway is known for his sparse, journalistic style, and I believe it can be argued that his characters have no names in the story to increase the sense of objectivity in the telling. As a young writer striving to establish his own "authorial voice", Hemingway was greatly influenced by the guidelines set forth at the newspaper for which he worked, guidelines which emphasized "compression, selectivity, and precision" in language. Minimal use of adjectives, and, in this particular work, the removal of names, serve to create a perspective of disinterest and detachment from the events which are being recounted. By not giving names to his characters, Hemingway also gives his story a certain universality, as if the situations and emotions the characters struggle to overcome and conceal are common to everyone.
The major constantly strives to maintain his dignified and detached demeanor by hiding his feelings of loss and bewilderment behind a strict, disciplined "soldier-like composure". He looks unflinchingly at the wall while receiving his therapy, signifying how he has managed to keep his emotions "walled-in". When he learns that his wife has died, however, the major for a time cannot remain detached. He weeps, and looks out the window instead of the wall, signifying that his emotions now are not imprisoned, and that for the moment, he is open and vulnerable.