[C++ or Other Android Development Languages] ssuukk:
Note to mods: this thread might be worth pinning! Using modern languages could highly improve code quality of Android apps.

OK, if you want native code, you can stick to C or C++, as you probably know interfacing native code with Java via JNI is neither pretty nor easy. But what about languages that compile to JVM (Dalvik/ART in Android case) that allow us to use tens of thousands of available java libraries in our projects? Java is quite nice but it's missing a lot of hot concepts available in modern languages like functional programming, duck typing and pattern matching. And as soon as you start using other JVM languages you'll discover Java is also extremely... verbose! I could use 5 Scala lines of code to do the same things I did in 50 lines of Java...

Note also that almost all of below languages handle null in a way much more civilized than Java. While in Java you would do:

if(someValue != null && someValue.someProperty!=null && someValue.someProperty.interestingString != null) doSomething(someValue.someProperty.interestingText)

In modern language you would just do:

doSomething(someValue?.someProperty?.interestingString)

Nice, eh?

And do believe me, these languages mix wonderfuly with Android API. Once you start coding in them, you won't come back to Java. Note that all of them have Android Studio plugins, that make the coding experience as easy as clicking "Install Plugin"!

So, let's start with the king:

Scala

Website: link

Getting started: link

Scala for Java developers: link

Why was it invented: Technically, Scala is a blend of object-oriented and functional programming concepts in a statically typed language. The fusion of object-oriented and functional programming shows up in many different aspects of Scala; it is probably more pervasive than in any other widely used language. The two programming styles have complementary strengths when it comes to scalability. Scala’s functional programming constructs make it easy to build interesting things quickly from simple parts. Its object-oriented constructs make it easy to structure larger systems and to adapt them to new demands. The combination of both styles in Scala makes it possible to express new kinds of programming patterns and component abstractions. It also leads to a legible and concise programming style.

A real beast of a language, I'm reading a fifth book on Scala right now, I have read tens of blog posts and I have a feeling like I haven't even scratched surface of it, although I've already incorporated Scala code into my XenoAmp project. If you're familiar with functional programming, you'll feel at home with Scala.

Let me rephrase the above paragraph: you PAINLESSLY incorporate below languages into your current project, without converting a single existing line! You just create new file that has extension different than .java! :D

Things like function literals, tuples, pattern matching and surprisingly flexible syntax of the language allow to create... a language within language, note very nice Scala/Android UI library named Scaloid and how it maintains its own minimal animation-only sub-language called Snails!

Scaloid activity layout example

Also read a blog post here about how can you write a clean code like this (note: NO SEMICOLONS!!! :D):

Scala
findView[Button](R.id.button).onClick { view : View =>
Toast.makeText(this, "You have clicked the button", Toast.LENGTH_LONG).show()
}

instead of this:

Java
Button v= (Button) findViewById(R.id.button);
v.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
Toast.makeText(this, "You have clicked the button", Toast.LENGTH_LONG).show();
}
});

Kotlin

Website: link

Getting started: link

Kotlin for Java developers: link

Why was it invented:

to create a Java-compatible language,

that compiles at least as fast as Java,

make it safer than Java, i.e. statically check for common pitfalls such as null pointer dereference,

make it more concise than Java by supporting variable type inference, higher-order functions (closures), extension functions, mixins and first-class delegation, etc;

and, keeping the useful level of expressiveness (see above), make it way simpler than the most mature competitor – Scala.

A language created by creators of IntelliJ Idea (base of AndroidStudio), with Android in mind. It's also functional, syntax based on Scala syntax, but much simplier and easier to learn. Also has a tool to convert your Java code to Kotlin! So if you want to start using all hip goodies like functional programmin, patter matching, nullable expressions and operators - this is a place to start without feeling overwhelmed (by Scala)

Read what Jake Wharton (the one behind NineOldAndroids and ActionBarSherlock) thinks about Kotlin: https://docs.google.com/document/d/...bEhCqTt29hG8P44aA9W0DM8/edit?hl=pl&forcehl=1#

Ceylon

Website: link

Getting started: couldn't find a good primer, but you could figure it yourself

Ceylon for Java developers: link

Why was it invented:

to be easy to learn and understand for Java and C# developers,

to eliminate some of Java’s verbosity, while retaining its readability,

to improve upon Java's typesafety,

to provide a declarative syntax for expressing hierarchical information like user interface definition, externalized data, and system configuration, thereby eliminating Java's dependence upon XML,

to support and encourage a more “functional” style of programming with immutable objects and higher-order functions,

to provide great support for meta-programming, thus making it easier to write frameworks, and

to provide built-in modularity.

Supposedly more powerful than Kotlin, with better syntax for lambdas (function literals).

I might write a bit more about each language as soon as I start using them, so stay tuned. And share your experience with alternatives in this thread!

Gosu

Website: http://gosu-lang.github.io

Getting started: http://gosu-lang.github.io/docs.html

Its most notable feature is its Open Type System API, which allows the language to be easily extended to provide compile-time checking for things that would typically be dynamically checked at runtime in many other languages. [Wikipedia] Doesn't seem to have functional programming capabilities.

Groovy

to be continued