SlideShare ist ein Scribd-Unternehmen logo
1 von 21
Martin Mois @ Softwerkskammer Do
What is Ceylon?
• „Allgemeine“ (general-purpose) Sprache
• Syntax ähnlich zu Java / C#
• Wesentliche Eigenschaften:
– Imperativ
– Statisch getypt (Compile-time type checking)
– Strukturiert in Blöcken
– Objekt-Orientiert
Runtime und Plattform
• Ceylon Module ausführbar auf:
– Java Virtual Machine
– JavaScript Virtual Machine
• Ceylon kann Java/JavaScript Code aufrufen (und umgekehrt)
• Ceylon SDK als Klassenbibliothek
– Einige SDK-Module basieren auf dem Java SDK, d.h.
keine Verwendung in JavaScript
Releases
• Version 1.0.0
– 13. November 2013
• Version 1.1.0
– 09. Oktober 2014
• Nächstes Release 1.2.0
– Fokus auf neue Features und Java EE-Integration
Klassen
• Klassendefinition:
– Kein expliziter Konstruktor
– Argumente der Klasse werden automatisch zu
Attributen
– Instanziierung ohne new
– Fat arrow als Kurzform, = als Konstante
Access Modifier
• Kein public/private
• Durch „shared“ wird ein Element sichbar für die
nächst höhere Ebene:
Modul
Paket
Klasse / Top-Level Funktion
Attribut / Methode
Optional
• Optionale Typen wie String? erlauben den Umgang
mit möglichen null-Referenzen:
Sequences
• [X+]: Sequence, die mindestens einen Wert liefert
• [X*], X[]: Sequence, die keinen Wert haben muss
• nonempty-Operator:
Iterables
• {X+}: Iterables (Streams), die mindestens einen Wert liefern
• {X*}: Iterables, die auch keinen Wert haben
Tuples
• Ein Tupel ist eine verkette Liste, welche sich den
statischen Typ der Element merkt:
Flow-sensitive typing
• Kein C-typischen Casts (nach instanceof):
Union types
• Wert kann einem Union type X|Y zugewiesen werden,
wenn er entweder X oder Y ist:
Intersection types
• Wert kann einem Intersection type X&Y zugewiesen
werden, wenn er X und Y zugewiesen werden
kann:
Typ-System: Datentypen
• Keine „primitiven“ Datentypen
– Aus Performance-Gründen: Compiler verwendet Javas
primitive Typen
– Trotzdem numerische Operatoren verwendbar:
Typ-System: „mixin“ Vererbung
• Interfaces können Attribute und konkrete
Methoden definieren:
Attribut darf keinen konkreten
Wert haben
Typ-System: „mixin“ Vererbung
• Klasse darf zwei
Attribute/Methoden mit
gleichem Namen erben
– Doppeldeutigkeiten
müssen in
gemeinsamem
Vorfahren ausgeräumt
werden
Typ-System: Reifizierbarkeit
• Vollständig reifizierbar
– Kein „type erasure“ bei Generics wie in Java
Covariance and Contravariance
• Ein Geek ist auch eine Person, aber…
• Collection produziert und konsumiert Geeks und keine
Personen -> zwei Interfaces notwendig:
Covariance and Contravariance
• Nun kann Collection als „mixin“ von Producer und Consumer
definiert werden:
• Und Personen können zu Geeks hinzugefügt werden:
• Damit produziert geeks auch Personen:
Typ-System: Anonyme Klassen
• Benannte Instanz einer Klasse ohne der Klasse selbst
einen Namen zu geben
• Kann Werte einfassen (Closure):
Benannte Argumente
• Namen der Argumente können genutzt werden:
• Dies erlaubt deklarative
Instanziierung:

Weitere ähnliche Inhalte

Empfohlen

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 

Empfohlen (20)

Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage EngineeringsProduct Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
 
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental HealthHow Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
 
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdfAI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
 
Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 

Ceylon

  • 1. Martin Mois @ Softwerkskammer Do
  • 2. What is Ceylon? • „Allgemeine“ (general-purpose) Sprache • Syntax ähnlich zu Java / C# • Wesentliche Eigenschaften: – Imperativ – Statisch getypt (Compile-time type checking) – Strukturiert in Blöcken – Objekt-Orientiert
  • 3. Runtime und Plattform • Ceylon Module ausführbar auf: – Java Virtual Machine – JavaScript Virtual Machine • Ceylon kann Java/JavaScript Code aufrufen (und umgekehrt) • Ceylon SDK als Klassenbibliothek – Einige SDK-Module basieren auf dem Java SDK, d.h. keine Verwendung in JavaScript
  • 4. Releases • Version 1.0.0 – 13. November 2013 • Version 1.1.0 – 09. Oktober 2014 • Nächstes Release 1.2.0 – Fokus auf neue Features und Java EE-Integration
  • 5. Klassen • Klassendefinition: – Kein expliziter Konstruktor – Argumente der Klasse werden automatisch zu Attributen – Instanziierung ohne new – Fat arrow als Kurzform, = als Konstante
  • 6. Access Modifier • Kein public/private • Durch „shared“ wird ein Element sichbar für die nächst höhere Ebene: Modul Paket Klasse / Top-Level Funktion Attribut / Methode
  • 7. Optional • Optionale Typen wie String? erlauben den Umgang mit möglichen null-Referenzen:
  • 8. Sequences • [X+]: Sequence, die mindestens einen Wert liefert • [X*], X[]: Sequence, die keinen Wert haben muss • nonempty-Operator:
  • 9. Iterables • {X+}: Iterables (Streams), die mindestens einen Wert liefern • {X*}: Iterables, die auch keinen Wert haben
  • 10. Tuples • Ein Tupel ist eine verkette Liste, welche sich den statischen Typ der Element merkt:
  • 11. Flow-sensitive typing • Kein C-typischen Casts (nach instanceof):
  • 12. Union types • Wert kann einem Union type X|Y zugewiesen werden, wenn er entweder X oder Y ist:
  • 13. Intersection types • Wert kann einem Intersection type X&Y zugewiesen werden, wenn er X und Y zugewiesen werden kann:
  • 14. Typ-System: Datentypen • Keine „primitiven“ Datentypen – Aus Performance-Gründen: Compiler verwendet Javas primitive Typen – Trotzdem numerische Operatoren verwendbar:
  • 15. Typ-System: „mixin“ Vererbung • Interfaces können Attribute und konkrete Methoden definieren: Attribut darf keinen konkreten Wert haben
  • 16. Typ-System: „mixin“ Vererbung • Klasse darf zwei Attribute/Methoden mit gleichem Namen erben – Doppeldeutigkeiten müssen in gemeinsamem Vorfahren ausgeräumt werden
  • 17. Typ-System: Reifizierbarkeit • Vollständig reifizierbar – Kein „type erasure“ bei Generics wie in Java
  • 18. Covariance and Contravariance • Ein Geek ist auch eine Person, aber… • Collection produziert und konsumiert Geeks und keine Personen -> zwei Interfaces notwendig:
  • 19. Covariance and Contravariance • Nun kann Collection als „mixin“ von Producer und Consumer definiert werden: • Und Personen können zu Geeks hinzugefügt werden: • Damit produziert geeks auch Personen:
  • 20. Typ-System: Anonyme Klassen • Benannte Instanz einer Klasse ohne der Klasse selbst einen Namen zu geben • Kann Werte einfassen (Closure):
  • 21. Benannte Argumente • Namen der Argumente können genutzt werden: • Dies erlaubt deklarative Instanziierung: