3 ms·
If you ever tried to push some Java-generated code in the repository I will never ever approve your pull request. It's simply one of the most wrong thing that y
by tigershark 10y ago
If you ever tried to push some Java-generated code in the repository I will never ever approve your pull request.
It's simply one of the most wrong thing that you can do on so many levels that I really don't know from where to start.
You will need to keep track separately of the kotlin code and Java code and keep them in synch.
You cannot use the repository because, per your admission, you are doing this in secret, so if your machine dies then you lose all the original kotlin code.
Even if you didn't lose the original kotlin source future iterations of the language may change the generated code, so even if you simply remove a comment your pull request will have changes in pretty much all the generated files.
A simple refactoring can have similar effects.
Generated Java code in my experience can be spotted immediately given that usually is very verbose.
I simply can't imagine what huge amount of code that thing will generate for a simple one liner using streams, given that it's targeting Java 6.
Probably there are many more other reasons that I cannot think of early in the morning.
Last but not least, I'd rather never work with someone that tries to deceive all his colleagues and pushes in the repository awful code.
If you don't want to use Java then find another job, nobody is forcing you to work there.
- Buttons840 10y agoHave I ever committed auto generated Java? Yes. At one job my predecessor had done significant work in Java and somehow the only the compiled files were left behind. We reverse compiled them and that was my starting point for the project. As you can imaging the generated code was perfectly formated, with a very consistent style, and generic variable names. It wasn't terrible to work with. The language I'm proposing probably couldn't be too different than Java. But one trivial example would be to make all variables final by default unless they were marked "notfinal". This would be different than Java, and thus would be a new language. And it would be trivial to translate back and forth between this language and Java. Nobody could ever tell the difference. Granted all you would really be changing is syntax, which may or may not be worth while.