slycelote / caide

Automates certain common tasks that you do during programming competitions
84 stars 18 forks source link

Caide should not remove constructor from TopCoder solution #45

Closed Dlougach closed 2 years ago

Dlougach commented 2 years ago

I tend to have put some precalculations into the constructor for TopCoder solutions. Unfortunately, I found out the hard way that without "caide keep" comment it simply removes that constructor. I suggest 2 options:

1) Make it possible to configure the topcoder template in such way that it always adds default constructor with the "keep" comment. 2) Somehow magically figure out that in topcoder that constructor will be called. While we are at it maybe the same can be done with the main method.

slycelote commented 2 years ago

All fair points. Right now, part of solution code for TopCoder is generated by hardcoded logic inside caide.

Dlougach commented 2 years ago
slycelote commented 2 years ago

2. Somehow magically figure out that in topcoder that constructor will be called. While we are at it maybe the same can be done with the main method.

This will be included in the next release.