new android languages
Post on 26-Jul-2015
337 Views
Preview:
TRANSCRIPT
@ N H PAT T @ A G I L E C Y L ( 0 9 / 0 5 ! ) @ L I F E R AY
by wiredforlego
W H Y ?
by keso s
by Julochka
S W I F T F O R A N D R O I D ?
by Andreas
• Scala
• Kotlin
• Groovy
• Clojure
• Go
• Ceylon
• XTend
• JS
• C++
• C#
• PHP
• Python
• Ruby
• Swift
• QT
• Perl
• Pascal
• Smalltalk
• Small TODO app
• Uploaded soon to github
• Big post coming to nhpatt.com
F I G H T !
by wiredforlego
X T E N D - W H AT ?
• xtend & xtendroid
• 2011!
X T E N D - H O W ?
• Eclipse IDE + SDK, Android Studio incoming?
• About 40 minutes
X T E N D - C O D E
@AndroidActivity(R.layout.activity_main) class MainActivity {
@OnCreate def init(Bundle savedInstanceState) { }
}
X T E N D - T H I N G S
• Extension methods
• Lambda expressions
• Implicits
• Operator overloading
• Compiles to Java Code
G R O O V Y
by Bill Toenjes
G R O O V Y - H O W ?
• Android Studio, Groovy Gradle Plugin
• In groovy folder
• About 30 minutes
• SwissKnife
G R O O V Y - C O D E
def message = findViewById(R.id.message) as TextViewmessage.text = messageText;
G R O O V Y - T H I N G S
• Dynamic code & static code (@CompileStatic)
• Traits
• Better apis
• Great gradle integration (dagger support coming)
C E Y L O N - W H AT ?
• Ceylon
• Gavin King
• 2011
C E Y L O N - H O W ?
• Eclipse IDE + Ceylon Plugin + PAIN
• About 6 hours (eclipse hell + ceylon hell)
C E Y L O N - C O D E
shared actual void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); setContentView(R.\Ilayout.activity_main); assert (is TextView textView = findViewById(R.\Iid.action_settings)); }
C E Y L O N - O P I N I O N
• Not ready. Future?
• Doubt so.
S C A L A
by Mike
S C A L A - H O W ?
• Gradle plugin?
• Post 47 degrees: Idea + plugins + SBT + activator…
• About 1 hour
T R O L L I N G S C A L A
• findView without casts -> a trait
• scala one liners -> hard to read by others but nice in collections
• scala -> 2.8M with proguard -> heaviest environment
• NPE -> with optionals, great solution IMHO
• implicit context -> magic everywhere
• traits -> quite common (kotlin, ceylon, ‘groovy’…)
• no getters/setters -> quite common
• pattern matching -> it’s nice but pure functional style
• case classes -> a glorified switch/if
S C A L A - O P I N I O N
• I love scala, way better than Java, but…
• Paradigm swift
• Programmers (25 in TIOBE)
S C A L A - S C A L O I D
new SVerticalLayout {
STextView("Sign in").textSize(24.5 sp).<<.marginBottom(25 dip).>>
STextView("ID")
SEditText()
STextView("Password")
SEditText() inputType TEXT_PASSWORD
SButton("Sign in")
this += new SLinearLayout {
SButton("Help")
SButton("Sign up")
}.wrap
}.padding(20 dip)
S C A L A - M A C R O I D
// the layout goes here
setContentView {
getUi {
l[LinearLayout](
w[Button],
w[TextView]
)
}
}
G O
by Nico Kaiser
“ W h o s e b e t t i n g t h i s y e a r s I / O w i l l a n n o u n c e t h e r e p l a c e m e n t o f t h e A n d r o i d A P I w i t h t h e G o A P I ? “
“ I l l o g i c a l , i r r e s p o n s i b l e , i n s a n e p e o p l e a r e b e t t i n g t h i s . ”
“ G o , f o r C p e o p l e w h o h a t e C + + b u t a r e t o o a f r a i d o f r e a l I D E s f o r J a v a . ”
J a k e W h a r t o n
G O - H O W ?
• Docker image (docker -> boot2docker -> missing steps -> worst hello world ever!)
• About 2 hours (image is 4GB! + docker errors + no documentation)
G O - C O D E
• var State
• func Run
• type Callbacks (Start, Stop, Draw)
• Stubs
G O - O P I N I O N
• API for OpenGL/business logic
• Not ready for “classic” app.
• I’m worried about iOS support
K O T L I N
by Mike
K O T L I N - H O W ?
• Android Studio plugin
• About 10 minutes
K O T L I N - O P I N I O N
• I love Kotlin.
• Really easy learning curve.
• Few programmers doing Kotlin :(
J AVA 8
• JDK7: <>, multi-catch, strings in switches, try with resources…
• And java NIO/invokedynamic?
R E T R O L A M B D A
asdasdasdby Marcos Bessa
R E T R O L A M B D A - H O W ?
• Gradle Plugin
• About 30 minutes
R E T R O L A M B D A - O P I N I O N
• An incomplete hack.
• Nice if you don’t have any other option.
G O F O R B E I N G T H E M O S T H Y P E D
by David Luders
C E Y L O N F O R N O T B E I N G T H E R E
by David Luders
S C A L A C O N S O L AT I O N P R I Z E
by David Luders
K O T L I N
by David Luders
F I N A L W O R D S
by jmiguel rodriguez
N O T O N LY S Y N TA C T I C S U G A R
asdasdasdby Steve Maw
D A R T A N Y O N E ?
by Sasha Nilov
N E X T
asdasdasdby Pascal
E N D *
* ¿ A L G U I E N Q U I E R E Q U E L E M O N T E U N E N T O R N O ?
asdasdasdby Gord McKenna
T H A N K S ! - > K C Y. M E / 2 2 N D 2
by Ale Art
O K … K O T L I N V S S C A L A , F I G H T !
• Kotlin ppl are nice: comparison to scala -> if u are already using Scala or need sth on that list…
• A good, external, comparison
O K … K O T L I N V S S C A L A , F I G H T !
• The main design goals behind “Kotlin” are:
• 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.
top related