On 31 Jan 2013, at 11:45, Mircea Markus <mmarkus@redhat.com> wrote:

Hi,


The REST module is written in Scala (both main + tests). We have some *test* contributions written in Java (thanks  mlinhard).
There was an IRC discussion on whether it's worth migrating the Java contribution to Scala code or not. 

Pros for migrating the contribution from Java to Scala:
- the REST module is written in Scala. Contributing these tests in Java would make the module bi-lingual, potentially confusing future contributors

Why?  You can choose what to write your tests in.

- even though this is not the case with this particular contribution, there might be code duplications between the scala test suite and java test suite.

Don't create separate test suites.  Put them in the same class path - e.g., src/test/scala - you can have .java files in here too, they will be compiled together, run together, can reference one another.


Cons for migrating the contribution from Java to Scala:
- there are contributors that are not familiar with Scala or are more proficient with Java(such as mlinhard). Forcing them to contribute in a language they are not familiar with would put them off

+1

- my general feeling over time was that people (including me) are not very enthusiastic about debugging and extending Scala code. So IMO if there's a choice between scala and java  (in the scope of the scala modules) we should stick to Java wherever possible (such as this contribution). 

That should not be a hard and fast rule for all modules.  I agree that some modules (like core) should just stick to Java.  

This email is not about the migration of scala code to java, but about the very specific contribution described above (even thought the mix of scala+java code in ISPN is a a very interesting topic by itself). 

My vote: don't waste time in migrating the test to Scala, unless it is trivial, in which case then do that.

Cheers
Manik

--
Manik Surtani

Platform Architect, JBoss Data Grid