3 ms·
Didn't you read the rest of the article? They tested with arguments with different names. Further they showed that T was accessible from within the other templa
by jchw 9y ago
Didn't you read the rest of the article? They tested with arguments with different names. Further they showed that T was accessible from within the other template when it didn't have a template parameter T, making this even more bizarre.
Also, just to be completely sure, I tested it myself.
Using X: https://godbolt.org/g/B9YEgZ https://godbolt.org/g/B9YEgZ
Showing the template parameter leaking with neither T nor U: https://godbolt.org/g/CKe2wG https://godbolt.org/g/CKe2wG
- dgellow 9y agoI know that’s a detail, but if I’m not mistaking the author is only one person, not sure why you wrote your comment in plural form (that personally slightly confused me).
- jchw 9y agoI am a purveyor of singular they, lacking any other good gender-neutral way to refer to a singular person in English.
- deleted 9y ago[deleted]
- jacquesm 9y agoBut in this case 'he' is a 'he' and that's clearly listed at the top of the article. So no need to be 'gender-neutral'.
- jchw 9y agoI know I don't have to, but I do anyways; personal choice. First time anyone's really even pointed it out.
- dgellow 9y agoI’m not a native English speaker myself, and I don’t live in a place with a majority of native speakers, so maybe that’s why. I got confused reading your comment as I thought that you were talking about something that I missed from the article (a link, or something else), thus I shared this feedback. Though I’m not sure why people downvoted my comment. I haven’t expressed anything against the use of neutral pronouns (though that’s unexpected when the author is clearly a man). And I clearly specified that was a detail, not something to give importance to.
- schrodinger 9y agoFWIW as a native English speaker I didn’t even notice that they (hah) used they. It sounds natural when you don’t know (or don’t care to emphasize) the gender of the singular person in question. Just trying to be helpful for the next time you notice that construct :)
- jchw 9y agoSheesh, I'm not exactly obsessed with internet points but I am kinda curious why I got so downvoted. I wasn't really trying to be condescending, but the article kinda does answer this concern (regarding U being reserved) in a couple ways.
- mdip 9y agoAt risk of being downvoted, myself, as this is off-topic, but since there is no 'meta' and you're clearly looking to understand what happened, I suspect the issue originates in the first statement made from the original comment, which was posed in the form of a question: Didn't you read the rest of the article? My rule of thumb is that if a question can have ", moron?"[0] appended to it and both the meaning and tone remain unchanged, then it's going to be taken as condescending. You'll probably find that people who are particularly sensitive to keeping Hacker News a "civil place" (among which I count myself) will read that sentence and skip the rest of the comment before hitting the downvote button. Had it been left off, the rest of your comment offered clarity to anyone who simply skimmed the article or otherwise wasn't understanding what was being presented and might have missed that point. Removing the sentence also doesn't affect the information being conveyed[1]. While I'll take you at your word that it wasn't meant as condescending, a variant of Hanlon's Razor[2] applies which I had shared with me as "Where there are gaps of understanding, people tend to jump to the worst possible conclusion." and this serves as a pretty good example. You assumed the reader didn't bother to read the article, when it was equally likely that they simply didn't understand what was being presented -- a fair estimate since this is C++ templates, which is not something everyone encounters in their day-to-day. And folks who are able to downvote likely did so because they assumed you were being condescending, when it's equally likely that you may have simply written the comment hastily or meant the question in a less-sarcastically sounding manner -- a fair estimate since verbal queues are missing from written text and most of us type near the speed that we think. [0] Or "dumba$$" or "?, God!" (followed by a gesture of hands being thrown down in disgust) [1] I once had a great manager who, at a yearly feedback session, told me rather bluntly that I am too verbose and worked with me on how to convey a message by learning what is unnecessary for conveying it. As you can tell if you glance through my comment history, the lesson was entirely lost on me. While I'm much better at eliminating things that add negativity to my intent (often by adding more to my statements), I'm pretty terrible at identifying when brevity has higher value than precision and completeness. Though, when it really matters, I can pull it together if I take enough time... and on and on and on. [2] https://en.wikipedia.org/wiki/Hanlon%27s_razor https://en.wikipedia.org/wiki/Hanlon%27s_razor