While reading One Piece, I came across the sentence 本が買ってほしいんだ
I wonder what's the function behind this が and how it would differ from the standart を
While reading One Piece, I came across the sentence 本が買ってほしいんだ
I wonder what's the function behind this が and how it would differ from the standart を
What you might be missing is that this が doesn't pair with the verb 買う, but with the i-adjective ほしい. (Since an i-adjective simply describes its subject, it wouldn't make sense for it to use を for anything.) Here 買う is in te-form (買って), thus modifying ほしい.
This 〜てほしい construction is used here because the speaker wants someone else to buy the book for him. Otherwise, for "I want to buy the book", 本を買いたい (or 本は買いたい) would be fine.
What is the thing which is-desirable-for-buying? The book. So that's the grammatical subject. Just like how 本がほしい makes sense - the book is the desired thing; ほしい is making a claim about desirability, not about a person with a desire.
It is possible to use を here to mark a direct object of 買う. But I think this way suggests that the important thing is that the other party buys the book. The way seen here seems more natural by default: the important thing is that the speaker gets the book, as a result of the other party buying it for him.
See also:
I agree with the explanation in terms of object versus action focus but I think that some caution is advisable in the free shifting from をtoガ。 Almost all grammar texts and sources point to a use of を as the only acceptable marker with a transitive verb in the て形 and 欲しい。 True it is that in the web, some sources report as follows :" Regarding the use of the particle が instead of を with the verb "欲しい" (hoshii), some examples in casual or literary contexts may show exceptions where が appears in structures typically requiring を, such as with transitive verbs..........(Omitted)…..example in a manga, it’s likely an intentional deviation for narrative effect, which is not uncommon in informal or artistic expressions of Japanese”