I've been taught, often enough that I thought it was universal, that there are no unnecessary words in torah (chumash) — every word is there to teach us something. I've seen plenty of discussions in the g'mara that seem to follow this principle, too, understanding that two similar-seeming verses (or words) are there to teach two different principles because they can't be serving the same purpose.
For example, Sanhedrin 64b (summarized in point 3 of this outline, h/t @ba) asks why the torah says three times that one is chayav karet for idolatry and then finds three interpretations. It doesn't say explicitly there that each of the torah's three statements must be "consumed" by a different halacha, but this lesson from the Virtual Beit Midrash (Yeshivat Har Etzion) states the rule explicitly but without citation in a discussion of Kiddushin 72b, discussing a baraita:
The gemara begins its analysis of the beraita by questioning the reasoning behind Rabbi Yossi's position. The gemara explains that, in the context of those who are genealogically unfit to marry into the broad Jewish community, the Torah (Devarim 23:3-9) employs the term "congregation" (for example, a mamzer may not "enter the congregation of God") five times. Since the Torah could have simply listed all the different categories (mamzerim and converts of Amonite, Moabite or Egyptian descent) and stated once that they may not enter the congregation, the gemara assumes that the word "congregation" must have been used extra times in order to teach further details about these prohibitions. This is quite characteristic of Talmudic methodology. Since there are no unnecessary words in the Torah, words that appear extra must be there in order to teach some detail that we would not have known otherwise.
I have also heard, but don't know where, that a perfect torah would not need to include superfluous words (along the idea of @WAF's comment below), and of course God's torah is perfect. I'm not sure how much weight to give a human interpretation of divine intent.
Today I read that this "rule" about unnecessary words is not universally held.
What sources are there for each position? Who holds that there are no unnecessary words, and who does not, and on what bases?