This "the best in our year" comment got me thinking. I went and checked how it started. It goes deeper than a simple praise. Let me show you:
At the beginning of HBP:
QUOTE
"Your mother was Muggle-born, of course. Couldn't believe it when I found out. Thought she must have been pure-blood, she was so good."
"One of my best friends is Muggle-born," said Harry, "and she's the best in our year."
"Funny how that sometimes happens, isn't it?" said Slughorn.
"Not really," said Harry coldly.
Slughorn looked down at him in surprise. "You mustn't think I'm prejudiced!" he said. "No, no, no! Haven't I just said your mother was one of my all-time favorite students? ...
When Dumbledore asks him if he liked Slughorn;
QUOTE
"Er..."
Harry wasn't sure whether he liked Slughorn or not. He supposed he had been pleasant in his way, but he had also seemed vain and, whatever he said to the contrary, much too surprised that a Muggle-born should make a good witch.
Harry obviously doesn't like the general prejudice against Muggle-borns, and immediately objects, relating the issue to Hermione, priding in the facts that first, she is a Muggle-born; second, she is one his best friends, and third, she is the best in their year, not necessarily in that order.
QUOTE(The Half-Blood Prince @ p. 176-7)
"Granger? Granger? Can you possibly be related to Hector Dagworth-Granger, who founded the Most Extraordinary Society of Potioneers?"
"No. I don't think so, sir. I'm Muggle-born, you see."
Harry saw Malfoy lean close to Nott and whisper something; both of them sniggered, but Slughorn showed no dismay; on the contrary, he beamed and looked from Hermione to Harry, who was sitting next to her.
'Oho! "One of my best friends is Muggle-born and she's the best in our year!" I'm assuming this is the very friend of whom you spoke, Harry?'
"Yes, sir," said Harry.
"Well, well, take twenty well-earned points for Gryffindor, Miss Granger," said Slughorn genially.
Malfoy looked rather as he had done the time Hermione had punched him in the face. Hermione turned to Harry with a radiant expression and whispered, 'Did you really tell him I'm the best in the year? Oh, Harry!'
'Well, what's so impressive about that?' whispered Ron, who for some reason looked annoyed. 'You are the best in the year - I'd've told him so if he asked me!'
Hermione smiled but made a 'shush'ing gesture, so that they could hear what Slughorn was saying. Ron looked slightly disgruntled.
First of all, it's interesting that Slughorn notices Harry and Hermione sitting next to each other only after Hermione answered every question. When he first saw her sitting next to Harry and he must have thought that she's just another fangirl.
Ron's comment helped me realize something though. Apart from the fact that he, once again, disparages her apparent joy at being rightfully praised with his "what's so impressive about that" comment; he also makes the distinction between him and Harry when it comes to Hermione. You see, he says here that "he would have told Slughorn so
if he asked him". The thing is, Slughorn never asked Harry, and Harry told all that with the pride of proving Slughorn wrong, not out of obligation, as Ron makes it sound like. Even Malfoy would have told so if he was asked. Harry appreciating/praising/defending her intellect and Muggle origin
unprompted is what is so impressive about it.
S.