# Same language different version for polyglots

I'm using Python 2 and Python 3, abusing the floor division of py2. However, a commenter asked me if using the same language but different (major) versions is allowed. My question is, is this allowed? I recall seeing it before so I think so, but I would like to confirm.

• We don't have a default for this, so it's up to the OP. – Dennis Apr 18 '17 at 13:17
• @Dennis Alright, thanks. The commenter asked OP as well so I'll just wait for OP to answer. – user42649 Apr 18 '17 at 13:17
• Personally, I think the default should be to disallow it. It trivializes the challenge a lot of the time, since the same language can always use the same tricks between versions. – mbomb007 Apr 18 '17 at 14:05
• I recently had quite a bit of fun with this in codegolf.stackexchange.com/q/116152/8927, but made sure that the differences I exploited were somewhat relevant to the challenge (in this case, numeric differences, including the division difference you mention). It seemed to go down well. Had I used more general things (e.g. version check macros) I'm sure the response would have been more negative. Also I don't believe that it trivialises the challenge any more than the comment-in-one-language constructs which are used by a large proportion of the other language combinations. – Dave Apr 18 '17 at 20:18
• @mbomb007 You could propose to disallow it under the loophole rule. – Mast Apr 18 '17 at 22:45

• Why is it an issue for explicit version checks to be hard to ban? Not only is an explicit version check boring and unlikely to be upvoted, it also tends to take a lot of bytes; import sys;v=sys.version>'3', for instance. We don't need to ban it, such answers just won't often be competitive. – ymbirtt Apr 27 '17 at 9:26
• @ymbirrt: There's at least one golfing language in which the meaning of @ (a rotate instruction for the top three instructions) was reversed from one version to the next, partly because the author preferred it that way, and partly to make language detection easy. Is that a version check or not? Either way, it's very terse. (Even in practical languages, a version check can be very short, e.g. \$]<5 will distinguish between Perl 5 and Perl 4.) Note also that not all polyglot challenges have byte count as part of the victory condition. – user62131 Apr 27 '17 at 15:33