DoctorLai's blog

By DoctorLai, 11 years ago, In English

Is it better to automatically select the right language based on the file extension on code submissions?

For example, if I choose code.py the system should automatically detect it is a Python source code instead of giving me a 'Compiler Error' if I forgot to select the right language?

Thanks

  • Vote: I like it
  • -8
  • Vote: I do not like it

| Write comment?
»
11 years ago, # |
  Vote: I like it +6 Vote: I do not like it

I don't think it's OK for C++ and Java — there are two versions of each, and these versions are different. For example, gcc3 and gcc4 are not compatible — code can easily get CE under gcc4 and OK under gcc3.

»
11 years ago, # |
  Vote: I like it +17 Vote: I do not like it

I think it's better to make people to choose the default language in the account settings.