Within the story of the The Lord of the Rings, Tim and his nephew Tom were characters invented by the Hobbit Sam Gamgee, and so we might reasonably imagine that they were intended to be Hobbits, too. There are significant reasons to doubt this, however, with perhaps the most obvious being the fact that Tom wore boots, something that would have been remarkable for a Hobbit. What's more, he was clearly large enough to attempt to attack a Troll, which was doubtless foolhardy even for a Man, but would seem utterly impractical from a Hobbit's point of view.
This apparent discrepancy is explained by the origins of the poem, which did not originally belong to the world of The Lord of the Rings at all. In fact the original version of the poem ("Pēro & Pōdex", mentioned in note 1 above) was written 1926, and might very well have predated the invention of Hobbits altogether (dating that moment is difficult, but the poem certainly preceded the book The Hobbit by some eleven years). So, at the time it was written, Tolkien would have presumably been imagining Tim and Tom to be Men.
|