cd-moj / cdmoj

CD-MOJ
GNU General Public License v2.0
18 stars 6 forks source link

C++14 Support #2

Closed thelink2012 closed 6 years ago

thelink2012 commented 7 years ago

Currently, CD-MOJ sends .cpp problems into SPOJ to be compiled using the C++03 standard of the language, whereas there is an ongoing effort on the spread of Modern C++.

I've discussed the matter a bit with both @bcribas and @maups. Both have brought important points, and I'm opening this issue as an effort to join the discussion and give some ways we could approach the problem.

1 - Send using C++14 by default

The simplest and easier to implement approach. There's two problems with it:

Would be quite cool to see some of those errors in action @maups, would bring more context to this issue.

2 - Identify a new file extension for C++14

Would work but seems quite hacky. An extension not yet used by MOJ but that is quite common is .cxx, we could assign this one to Modern C++. Alternatively, add a new extension like .cpp14 or so.

3 - Specify classic C++ on contest-description.txt

For instance spoj-br PLACAR "Quem vai ser reprovado?" A reprovado.txt would use modern C++, but something like spoj-br PLACAR "Quem vai ser reprovado?" A reprovado.txt c++03 would use the older standard.

That seems complicated to implement now, so that's a cons. Plus doesn't seem to scale to the idea of the contests not specifying a programming language at all.


So that's it. As a student, I'm looking forward to have C++14 available not only in CD-MOJ, but to be gradually exposed to computer science students in general. Some of the features are quite cool and helpful.

Wanna hear some feedback on these approaches and maybe more possible approaches :)

cc @bcribas cc @maups

thelink2012 commented 7 years ago

Quick update on approach 1: GCC 6 uses C++14 as the default standard, that's why simply selecting gcc 6.3 on SPOJ-BR works.

Approach 1 really seems like the way to go.