I'd like feedback on this challenge I posted which was closed as unclear.
Make (a ==1 && a== 2 && a==3) evaluate to true?
One issue raised was the vagueness of "reasonably equivalent to". I was just trying to communicate $a == 1
for PHP, or a == 1
for JavaScript, so on. I know that different languages handle conditionals different. Is there a way I could phrase this requirement in a more strict way? Perhaps "Must do an equality comparison on a variable integer of 1, to integer of 2, and to integer of 3, in the same conditional"?
Another issue raised is that some languages do not involve if statements or Boolean. If I'm more clear that the language must support these concepts, will it be allowed, or does a challenge need to specify a language or support all languages?
Also, I heard this is an Underhanded challenge, which is not allowed. I haven't found a hard definition on it, but I did find this discussion on it and understand the general idea that it's a question that is tricky. Can someone provide a solid definition. Can this challenge can be made to not be Underhanded?
Is this challenge salvageable?
&&
is easy enough to define, it takes two booleans and behaves on them in a predictable manner (however that might eliminate some potential) but==
will probably snag you. The only property of==
that we can really nail down is that it takes two things and returns a boolean. Operating under that defintion makes this no longer a challenge because now you are just making a binary operation that always returns true. We can try to make stricter definitions but they will probably remove most reasonable methods of solving the problem. \$\endgroup\$