Wire-android: why scala?

Created on 1 Aug 2016  ·  2Comments  ·  Source: wireapp/wire-android

first,great work!
but I don't understand,why using scala?
Is there any benifit using it?
could anyone explain?
thanks!

Most helpful comment

That's not the best place for this kind of questions.
We chose Scala because we could, because it works, and we like it :)
There is no hard reason for that choice, you could write it in plain Java if you like it.
It mostly boils down to personal preference, we choose the tools that we believe are good for the job.
I like Scala because it's concise and powerful, it let's us write less code with better type safety, meaning much less bugs.

To be clear, Scala is mostly used in sync engine part. Most of UI is still written in Java.

I won't be able to fully answer your question, you will need to look at the code and decide yourself if you find it better or worse. Take a look at classes in com.waz.zclient.calling package. Consider how would corresponding Java code look like. How much code would you need to write to create call screen handling both audio and video calls?

All 2 comments

That's not the best place for this kind of questions.
We chose Scala because we could, because it works, and we like it :)
There is no hard reason for that choice, you could write it in plain Java if you like it.
It mostly boils down to personal preference, we choose the tools that we believe are good for the job.
I like Scala because it's concise and powerful, it let's us write less code with better type safety, meaning much less bugs.

To be clear, Scala is mostly used in sync engine part. Most of UI is still written in Java.

I won't be able to fully answer your question, you will need to look at the code and decide yourself if you find it better or worse. Take a look at classes in com.waz.zclient.calling package. Consider how would corresponding Java code look like. How much code would you need to write to create call screen handling both audio and video calls?

i think you must misunderstood me(english is not my first language).if any inconvenient,apologize.
i just never saw a project using scala before,so i was curious.
i google some docs and blogs explained the grammar and background,bu not in detail.
like you said it's a better choice for handing audio and video calls,i was thinking it's a tool like dagger2.
thank you for explaining the why and how using scala.

Was this page helpful?
0 / 5 - 0 ratings