SlideShare a Scribd company logo
Developing Android
applications with
Ceylon
Enrique Zamudio
@chochosmx
github.com/chochos
@ceylonlang
#CeylonLang
• Programming since 1982
• Professionally since 1994
• Java since 2000
• FOSS projects:
• j8583
• jAlarms
• Ceylon
• Java Champion 2015
Why Ceylon?
• Many Android devs are not too keen on Java
• Some don't even consider it to be a "real" Java
• Type system is somewhat limited
• Lots of anonymous classes throughout
codebase
Ceylon advantages
• Functions are first-class citizens
• Higher-order functions
• Union and intersection types
• Easier to manage generics
• No checked exceptions
• More typesafe (typesafer?) than Java
• Typesafe null, bounded generics
User|LoginError login(
String username,
String password);
String password);
String password);
Union type
if (is User r = login(u,p)) {
//it's a user
print(r.username);
} else {
//it's an error
print(r.reason);
}
}
}
}
}
}
Object obj = ...;
if (obj instanceof Foo) {
print(((Foo)obj).foo);
}
}
}
}
Object obj = ...;
if (obj instanceof Foo) {
print(((Bar)obj).bar);
}
}
}
}
Serializing
Runnables
void send(??? task) {
//send task over the wire
//is run on the other side
}
}
}
}
interface MyTask
extends Runnable,
Serializable {}
Serializable {}
Serializable {}
void send(MyTask task) {
//send task over the wire
//is run on the other side
}
}
}
}
class WeirdlyNamedApacheTask
implements Runnable,
Serializable {
...
}
}
}
}
}
class CumbersomeWrapper
implements MyTask {
final WeirdlyNamedApacheTask
wrappedTask;
}
}
}
}
}
void send(
Runnable & Serializable task) {
//send task over the wire
//is run on the other side
}
}
}
}
}
void send(
Runnable & Serializable task) {
//send task over the wire
//is run on the other side
}
}
}
}
}
Intersection type
null
ObjectObjectObjectObject
ObjectObjectObjectObject NullNullNullNull
ObjectObjectObjectObject NullNullNullNull
AnythingAnythingAnythingAnything
ObjectObjectObjectObject NullNullNullNull
AnythingAnythingAnythingAnything
StringStringStringString NumberNumberNumberNumber
ObjectObjectObjectObject NullNullNullNull
AnythingAnythingAnythingAnything
StringStringStringString NumberNumberNumberNumber nullnullnullnull
String s = null;
Integer s = null;
Null n = null;
Null n = null;
Null n = null;
String s = null;
Integer s = null;
Null n = null;
Null n = null;
Null n = null;
✘
String | Integer
String | Null
String | Null
String | Null
String|Integer a = 1;
String|Integer b = "one";
String|Null s1 = "s";
String|Null s2 = null;
;
;
;
;
String|Integer a = 1;
String|Integer b = "one";
String? s1 = "s";
String? s2 = null;
;
;
;
;
String? s = foo();
print(s.size); //WON'T COMPILE
if (exists s) {
...
}
}
}
}
}
ObjectObjectObjectObject NullNullNullNull
AnythingAnythingAnythingAnything
StringStringStringString NumberNumberNumberNumber nullnullnullnull
Algebraic
(enumerated) types
(enumerated) types
of Object|Null
class Null of null
object null extends Null
Null
Null
Null
Null
class Boolean
of true|false
class Comparison
of larger|smaller|equal
larger|smaller|equal
larger|smaller|equal
larger|smaller|equal
larger|smaller|equal
ObjectObjectObjectObject NullNullNullNull
AnythingAnythingAnythingAnything
StringStringStringString NumberNumberNumberNumber nullnullnullnull
Bottom type
ObjectObjectObjectObject NullNullNullNull
AnythingAnythingAnythingAnything
NothingNothingNothingNothing
NumberNumberNumberNumberStringStringStringString nullnullnullnull
Iterable<String,Nothing>
Object & Null
Nothing
Nothing
Nothing
Nothing
Nothing
Nothing
Demo time!
Code dive
¿?
try.ceylon-lang.org
github.com/ceylon
@ceylonlang
enrique@ceylon-lang.org
@chochosmx
gitter.im/ceylon

More Related Content

PPTX
TypeScript Modules
PPTX
TypeScript
PDF
A Type-level Ruby Interpreter for Testing and Understanding
PPTX
JavaScript Beyond jQuery
PPTX
study of java
PPTX
Java object
PDF
WDB005.1 - JavaScript for Java Developers (Lecture 1)
PDF
"Scala in Goozy", Alexey Zlobin
TypeScript Modules
TypeScript
A Type-level Ruby Interpreter for Testing and Understanding
JavaScript Beyond jQuery
study of java
Java object
WDB005.1 - JavaScript for Java Developers (Lecture 1)
"Scala in Goozy", Alexey Zlobin

What's hot (20)

PPTX
Introduction to f#
PPTX
I18nize Scala programs à la gettext
PDF
A Deep Dive into Javascript
ODP
JavaScript global object, execution contexts & closures
PPTX
PDF
Akka actorstotherescue nirmalya sengupta
PPT
Introduction to java programming
PPT
JavaScript iteration
PDF
New c sharp4_features_part_v
ODP
JavaScript Object Oriented Programming Cheat Sheet
PDF
Java Serialization Deep Dive
PDF
A Static Type Analyzer of Untyped Ruby Code for Ruby 3
PDF
Real-World Scala Design Patterns
PDF
JavaScript: Patterns, Part 3
PPTX
Children of Ruby
PPTX
AngularConf2015
PPTX
Beginning Java for .NET developers
PDF
Javascript for Intermediates
PDF
Lock-free algorithms for Kotlin Coroutines
PPSX
JAVA VIRTUAL MACHINE
Introduction to f#
I18nize Scala programs à la gettext
A Deep Dive into Javascript
JavaScript global object, execution contexts & closures
Akka actorstotherescue nirmalya sengupta
Introduction to java programming
JavaScript iteration
New c sharp4_features_part_v
JavaScript Object Oriented Programming Cheat Sheet
Java Serialization Deep Dive
A Static Type Analyzer of Untyped Ruby Code for Ruby 3
Real-World Scala Design Patterns
JavaScript: Patterns, Part 3
Children of Ruby
AngularConf2015
Beginning Java for .NET developers
Javascript for Intermediates
Lock-free algorithms for Kotlin Coroutines
JAVA VIRTUAL MACHINE
Ad

Viewers also liked (20)

PPTX
Highway failure & their maintenance ppt
PPTX
Inclusión educativa
PPTX
La religion
PPTX
Accidentes de trabajo causas, efectos y prevencion
PPTX
Mapa mental gerencia industrial (lesbia)
PPTX
AgileDays 2017: Особенности фасилитации больших команд
DOC
Lo1 workbook
DOCX
PPTX
La narración y sus partes
DOCX
Lo2 workbook
DOCX
Lo3 workbook
PPTX
Känsla av sammanhang och mening genom att leva i treenighetens kärleksflöde
PPTX
Generics and Lambda survival guide - DevNexus 2017
PDF
Practical tipsmakemobilefaster oscon2016
PDF
Reaching the lambda heaven
PDF
Java Puzzlers NG S02: Down the Rabbit Hole as presented at DevNexus 2017
PDF
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017
PDF
Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014
PDF
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
PPTX
Intro to Microsoft Cognitive Services
Highway failure & their maintenance ppt
Inclusión educativa
La religion
Accidentes de trabajo causas, efectos y prevencion
Mapa mental gerencia industrial (lesbia)
AgileDays 2017: Особенности фасилитации больших команд
Lo1 workbook
La narración y sus partes
Lo2 workbook
Lo3 workbook
Känsla av sammanhang och mening genom att leva i treenighetens kärleksflöde
Generics and Lambda survival guide - DevNexus 2017
Practical tipsmakemobilefaster oscon2016
Reaching the lambda heaven
Java Puzzlers NG S02: Down the Rabbit Hole as presented at DevNexus 2017
DevOps @Scale (Greek Tragedy in 3 Acts) as it was presented at DevNexus 2017
Agile Metrics : Velocity is NOT the Goal - NDC Oslo 2014
Post-Modern CSS: Start learning CSS Grid, Flexbox and other new properties
Intro to Microsoft Cognitive Services
Ad

Similar to Developing Android applications with Ceylon (20)

KEY
Ceylon - the language and its tools
PDF
Abstracting over Execution with Higher Kinded Types
PDF
Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...
PDF
Ceylon SDK by Stéphane Épardaud
PDF
06_Overloading_Overriding_this_super.pdf
PDF
Ceylon/Java interop by Tako Schotanus
PPTX
Lecture38
KEY
Charles nutter star techconf 2011 - jvm languages
PPTX
Kotlin Language Features - A Java comparison
PDF
Programming with Millions of Examples (HRL)
PDF
How to create a programming language
PDF
Scala at HUJI PL Seminar 2008
PPTX
JVM languages "flame wars"
PDF
7li7w devcon5
PDF
What I learned from Seven Languages in Seven Weeks (IPRUG)
PDF
Kotlin @ Devoxx 2011
PDF
Kotlin Slides from Devoxx 2011
PDF
Crystal presentation in NY
PDF
scala reloaded
Ceylon - the language and its tools
Abstracting over Execution with Higher Kinded Types
Mixing Source and Bytecode: A Case for Compilation By Normalization (OOPSLA 2...
Ceylon SDK by Stéphane Épardaud
06_Overloading_Overriding_this_super.pdf
Ceylon/Java interop by Tako Schotanus
Lecture38
Charles nutter star techconf 2011 - jvm languages
Kotlin Language Features - A Java comparison
Programming with Millions of Examples (HRL)
How to create a programming language
Scala at HUJI PL Seminar 2008
JVM languages "flame wars"
7li7w devcon5
What I learned from Seven Languages in Seven Weeks (IPRUG)
Kotlin @ Devoxx 2011
Kotlin Slides from Devoxx 2011
Crystal presentation in NY
scala reloaded

More from Enrique Zamudio López (8)

PDF
Bulletproofing your foot for Kotlin
PPTX
Introducción a Protocol Buffers
PDF
Sistemas de tipos: Lo bueno, lo malo y lo feo
PPT
Criptografía para simples mortales
PDF
Diseño de compiladores: Un vistazo a Ceylon-JS
ODP
Introducción a Ceylon
ODP
PCJ Sesión 9: Threads
ODP
Introducción a jAlarms
Bulletproofing your foot for Kotlin
Introducción a Protocol Buffers
Sistemas de tipos: Lo bueno, lo malo y lo feo
Criptografía para simples mortales
Diseño de compiladores: Un vistazo a Ceylon-JS
Introducción a Ceylon
PCJ Sesión 9: Threads
Introducción a jAlarms

Recently uploaded (20)

PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
TLE Review Electricity (Electricity).pptx
PPTX
cloud_computing_Infrastucture_as_cloud_p
PPTX
Tartificialntelligence_presentation.pptx
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Mobile App Security Testing_ A Comprehensive Guide.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
Accuracy of neural networks in brain wave diagnosis of schizophrenia
PDF
Approach and Philosophy of On baking technology
PDF
Getting Started with Data Integration: FME Form 101
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
Programs and apps: productivity, graphics, security and other tools
TLE Review Electricity (Electricity).pptx
cloud_computing_Infrastucture_as_cloud_p
Tartificialntelligence_presentation.pptx
SOPHOS-XG Firewall Administrator PPT.pptx
Mobile App Security Testing_ A Comprehensive Guide.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Per capita expenditure prediction using model stacking based on satellite ima...
Digital-Transformation-Roadmap-for-Companies.pptx
A comparative analysis of optical character recognition models for extracting...
Accuracy of neural networks in brain wave diagnosis of schizophrenia
Approach and Philosophy of On baking technology
Getting Started with Data Integration: FME Form 101
Advanced methodologies resolving dimensionality complications for autism neur...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
TechTalks-8-2019-Service-Management-ITIL-Refresh-ITIL-4-Framework-Supports-Ou...
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm

Developing Android applications with Ceylon