I found this question; it is asking about if final object references can be initialized as null, but the answer can easily be found by compiling the code (it is possible that OP may want to know when to use it). Can we close these types of question? If so, what is the close reason?
-
2Possibly "no longer can be reproduced" since it isn't really a "problem" any more - although thats stretching it. Your best option would be to close as a duplicate that explains whatever error you'd get by doing it (if applicable) or what the behaviour would be used for.– SayseJul 20, 2016 at 7:36
-
5There are many situations where using a particular compiler to compile a particular piece of code may lead to a conclusion which doesn't agree with one someone familiar with the language definition may reach.– francescalusJul 20, 2016 at 7:38
-
1Very often, "unclear" or "too broad" can be used, because it isn't clear why the asker couldn't do that, or he needs a complete explanation from first causes. Whether one could go for "no MCVE"? Maybe, due to the OP omitting the errors/warnings, though it's a stretch.– DeduplicatorJul 20, 2016 at 7:45
-
Close-voted as "Can no longer be reproduced": "this question was resolved in a manner unlikely to help future readers."– CerbrusJul 20, 2016 at 7:48
-
Sometimes the compile it and find out argument is not a valid way to find out something. The compiler could have a bug or a extension that allows a piece of code that should not compile to compile.– NathanOliverJul 20, 2016 at 12:22
-
1However, in this case: "Just try it" is the only proper answer. Questions like that really don't add any value to SO.– CerbrusJul 20, 2016 at 12:39
-
@Cerbrus I dare say I strongly disagree. Many languages have constructs which cause undefined behavior or implementation defined behaviour. In such cases just running code can give wrong and deceptive results.– ValityJul 20, 2016 at 20:25
-
@Vality: Straw man. The linked question is simply a case where the OP just had to compile his code.– CerbrusJul 20, 2016 at 20:48
-
@Cerbrus I agree for this question that was the case. But without sufficient familiarity with a language it can be hard to tell which questions can or cannot be answered reliably through trying to compile. Only a person can really confirm for sure if it is well defined.– ValityJul 20, 2016 at 20:52
-
@Vality: "However, in this case: "Just try it" is the only proper answer." What are you even trying to discuss here? I'm not disagreeing with Nathan. I'm just saying that in this case, the question can be closed.– CerbrusJul 20, 2016 at 20:55
-
@Cerbrus sorry for my lack of clarity. What I am trying to say, is it was impossible for the OP to know if just trying it was a valid solution until they had been told so. Say they did run it and didn't ask here. How could they have known if the result was specified and reproducible without examination of the language standards or asking?– ValityJul 20, 2016 at 20:57
-
@Cerbrus however in this case it appears to now be closed anyway so this is fairly irrelevant, sorry for wasting your time– ValityJul 20, 2016 at 20:58
-
@Vality: The OP literally asks: "Can we do X?", with example code. He's asking if it would compile. It's far from impossible to to know if "just trying it" is a valid solution. "Just trying it" is the first, middle and last step of finding an answer on something as basic as "does this compile?"– CerbrusJul 20, 2016 at 21:01
-
To the general inquiry... I could still see rare(?) benefit to such a question. A future coder may wish to get quick verification on the same questionable construct without resorting to compilation for various reasons (writing code off platform, still designing, has other incomplete code hindering compile), in addition to that outlying possibilities that the requester has valid need (inconsistent compilers, seeking help just part of larger code). All examples probably do point to the need to improve the question, but it'd be great to see people default to trying to help rather than to close.– JeopardyTempestAug 22, 2016 at 8:10
Add a comment
|
1 Answer
While the question is rightfully downvoted (it doesn't show any research effort at all), that does not mean it needs to be closed. It is on-topic, it can be answered (with a simple 'yes'), I couldn't find a duplicate, so I see no reason to close it.
-
2But, whenever I try to answer with "yes" it rejects me with "Body must be at least 30 characters; you entered 3."– BraiamJul 20, 2016 at 19:58