13

I've come over this (stated as) newbie question here recently.

It's a frequently observable misconception in questions for a number of programming languages, that scoped/local variable/parameter symbolic names are thought to be related in a way.

I've been initiating closure quite well, but changed my mind now. The question as is now isn't really too broad, but just states an easy to answer misconception.

I've been trying to bang this question in shape, to look a bit more canonical, and tried to answer.
Though the question's state seems to be hopelessly doomed, and I attempted to setup a canonical answer for this kind of misconception (at least for c++) no matter of it's current score.

What else (besides asking here, voting to reopen) can I do to, make this fly?

If anyone already has a handy canonical for this question, please mark it as duplicate there.

If anyone feels invited, edit the question, give more answers or edit the existing one as appropriate.


Since the question in question was deleted meanwhile, a snapshot for the mere mortals

enter image description here enter image description here

10
  • 6
    So, you are asking if there is any canonical for variable identity, touching such concepts as scope, lifetime and all relevant types of forward-declaration, right? Nov 3, 2014 at 22:37
  • @Deduplicator What I'm observing is, that newbies always confuse variable/symbol names,- beyond any scope given -, to match what they think it does (including shadowed variables). Nov 3, 2014 at 22:45
  • @Deduplicator Yes, finally I'm asking if such canonical already exists (at least for c++), or at least, if we can pick-up a completely OT question to make it a canonical :-P ... Nov 3, 2014 at 23:09
  • @remyabel Didn't see void main() for the particular case, did you? But even if so, I#d like to dupe hammer such kind of questions as soon I see them :-P ... Nov 3, 2014 at 23:20
  • 1
    Voted to re-open, just to have a canonical duplicate to point others to. Not going to up vote it though, it's still a horrible question. "I do not really understand the return part", jeez.
    – Jongware
    Nov 3, 2014 at 23:22
  • @Jongware "I do not really understand the return part" I even tried to answer this appropriately. Nov 3, 2014 at 23:23
  • Boah, @RobertHarvey short cut decided to completely delete it :-P ... Nov 3, 2014 at 23:25
  • 2
    @πάνταῥεῖ: Seems you have to make your own, thorough self-answered one. At lest Robert just deleted the question. Nov 3, 2014 at 23:26
  • @Deduplicator "Seems you have to make your own, thorough self-answered one." Yeah, seems so. I'm going to consider that. May be not today (-nite) though (yawn) ;-) ... Nov 3, 2014 at 23:30
  • 1
    This question almost seems so fundamental as to close as duplicate of the C++ book list (probably with a comment saying why).
    – Mark B
    Nov 4, 2014 at 4:46

1 Answer 1

8

Close it as a duplicate of the canonical question/answer pair that you've already created for this purpose.

Example: What would the evaluation order of x = x++ + ++x; be?

If you don't have a canonical post to close it as a duplicate of, or it isn't a qualified duplicate of a canonical question, then handle it in the usual fashion (i.e. close it if it's unclear, too broad, etc).

If it's a decent question, and no canonical exists for it, make it the new canonical, and close future questions as duplicates of it.

6
  • So as @Deduplicator already suggested (and I more or less accepted so), I have to create my own canonical Q&A a priori, but there's merely no chance to pick up a incoming one, and bang in shape for becoming a well accepted canonical? Nov 3, 2014 at 23:59
  • Why not? I already said you could do that in my answer. Nov 4, 2014 at 0:03
  • "If it's a decent question" So my part would have been making it one, and I obviously failed, since you decided to delete it :-( ... Though I'd appreciate some hints how this question could have been made a decent one beyond my edits (trying not to vandalize the question). Nov 4, 2014 at 0:08
  • 3
    Taking a cursory look at the question and answer, it seems that the OP merely lacks some fundamental knowledge. Only a book, training, or more self-learning fixes that. Nov 4, 2014 at 0:23
  • I've been observing that particular kind of confusion regarding variable/parameter names and return values a lot of times (especially for c/c++ language). Though you're correct, this kind of stuff is usually covered by the basic lectures, it's a common misconception thinking these are related through naming somehow (because of misleading sample code maybe). Nov 4, 2014 at 0:32
  • "Close it as a duplicate of the canonical question/answer pair that you've already created for this purpose." To be clear about this: I don't have one, but I want to make that question fitting for a canonical. Nov 4, 2014 at 0:35

Not the answer you're looking for? Browse other questions tagged .