26

Quick typographical/convention question,

How are we supposed to use programming keywords in the title? E.g.:

  • What does `this` mean?
  • What does "this" mean?
  • What does this mean?
  • Other?

(not the third one obviously)

Edit: My question is not about markup, but about typography

10
  • 6
    You can't do that. Commented Oct 31, 2016 at 18:43
  • 3
    I can't do what?
    – user1361491
    Commented Oct 31, 2016 at 18:44
  • 1
    You can't render code in question titles. Commented Oct 31, 2016 at 18:45
  • 1
    What πάνταῥεῖ means is that you can't format code in titles, though it looks like you are more asking how you should "highlight" it in titles, correct?
    – Kendra
    Commented Oct 31, 2016 at 18:45
  • 1
    don't. Instead, create a meaningful title and a short summary at the top of the question.
    – Kevin B
    Commented Oct 31, 2016 at 18:46
  • 7
    Yeah, I'm not trying to render code with a gray background, just to differentiate keywords and actual words. Like in the example I used: it would be confusing not to indicate it
    – user1361491
    Commented Oct 31, 2016 at 18:48
  • Just to be sure: Don't ask that question (about the this keyword, especially in JavaScript) on the main site. It'll be a duplicate of many questions. Commented Oct 31, 2016 at 18:54
  • 2
    What does this mean?
    – Goose
    Commented Oct 31, 2016 at 20:49
  • If your question is "What does this mean?" then your question is probably already off-topic. If you're absolutely sure that it's not off-topic then consider a title like "Understanding certain keywords in [language]" and then explain in your question (where you can format) which keyword(s) you're interested in. Commented Nov 3, 2016 at 11:33
  • 2
    Let me say this one more time guys: it's an example
    – user1361491
    Commented Nov 3, 2016 at 17:27

1 Answer 1

38

Quotation marks are used in English to distinguish using a word as an object rather than for its meaning, so the second is a good start: "What does 'this' mean?"

But that still needs more work to be actually clear and a good title. Including some other words for context would be important in your example: "What does the term 'this' mean inside of a Java method?"

5
  • 1
    Great answer. Of course, the example I used is unclear but you got the point
    – user1361491
    Commented Oct 31, 2016 at 19:06
  • 5
    Nice compromise. "What does 'f a' mean?" is easier to understand than "What does f a mean?" and prettier than "What does `f a` mean?".
    – duplode
    Commented Oct 31, 2016 at 19:31
  • 1
    Probably better to say "What does the term 'this' mean inside a method?" since java is (or at least should be) already in the tags.
    – Tim
    Commented Nov 3, 2016 at 11:36
  • 1
    I would argue for just "inside a method", since we discourage users from putting the language in the title and use tags for that instead. Commented Nov 3, 2016 at 11:50
  • 1
    The rule is not "information that appears in the tags must not appear in the title ", @MatthieuM, it's "don't force tags into the title". meta.stackoverflow.com/a/286766 In this case, including the word "Java" is important to distinguish the hypothetical title from the same question about any other language that has methods and uses the keyword this.
    – jscs
    Commented Nov 3, 2016 at 16:05

You must log in to answer this question.