PG, could you please explain how HN decides when to show/hide the total number of comments on a post?<p>When there are 0 comments on a story, the link is shown as "discuss". The link changes to "1 comment" or "N comments" for N>1. However, at some point, it changes just to "comments" with no number shown.<p>As far as I can tell, the change is independent of the number of comments and there doesn't seem to be any particular length of time from when the story was submitted that triggers the change. The behaviour also seems to be different depending on whether you are logged in or not.<p>I know it is only a minor aspect of the site, but I have been curious about how it works for a while. Also, what was the logic (if any) in taking this approach?
I am not PG either but I believe that wglb is right: the number of comments is shown for items in RAM, but not for items on disk. Recent items are held in RAM, but not all older items are.<p>Changes in behaviour when logged out are likely due to caching. We can cache the logged-out pages more aggressively since they're shared by all logged-out users.
I am not PG (nor have I been for some time) but I once heard it explained that this is due to the fact that after memory fills up, comments are cached to disk, and this is represented by the "comments" tag rather than the actual count. If someone clicks there, I believe the number will show again.