Master any programming language fast

The Ceylon Programming Language

Share
Like SyntaxCorect.com on Facebook
Be the first to rate this article

A few years ago, all of a sudden, Java started to feel cumbersome and verbose to many programmers. Maybe it was the Node.js effect, maybe it was for the slowness of Java evolution, but the urge to have a Java's more lightweight successor without loosing the advantages of the JVM and the Java ecosystem emerged and one of the results of it is the birth of the Ceylon programming language

Introduction

Ceylon is a computer programing language first appeared on the scene 8 years ago (2011). It is a multi-paradigm, statically typed, object-oriented (class-based), structured, imperative, generic, reflective, functional and procedural programming language with automatic memory management whose main purposes are:

  1. to propose to developers a new, better and more productive language which is 100% compatible with Java but offers more type-safe constructs and allows more concise sources and expressive code;
  2. to offer to programmers a single programming language to develop software for both server-side and client-side fronts. In fact Ceylon programs can be compiled to JVM bytecode or transpiled to JavaScript.

Ceylon has been designed by Gavin King at Red Hat.

First glance at the code

Example: The classic "Hello world" program written in Ceylon:

Main features of Ceylon

Technical features

Statically typed

In Ceylon everything is an object. There are no primitive types or arrays in Ceylon—every Ceylon type can be represented within the language itself as a class. However, the Ceylon compiler is permitted to optimize certain code to take advantage of the optimized performance of primitive types on the Java or JavaScript VM.

Object-oriented

Ceylon is object-oriented. It supports common object-oriented patterns like interfaces, classes and also supports generics which contrary to Java are fully reified, that means that generic types are available at runtime. Multiple inheritance is not allowed, but the language supports mixins.

Memory management

Memory management in Ceylon is automatic. Depending on the target of the compiled sources Ceylon uses the JVM garbage collector or the JavaScript one.

Concurrent

Ceylon doesn't provide any facility for concurrent programming. However, a Ceylon program executing on the Java Virtual Machine may interact with Java libraries that make use of concurrency.

Performance

Ceylon performcance depends on the target the sources are compiled to, JVM or JavaScript.

Other features

Free and open source

Ceylon is free and open source software licensed under the Apache 2 License.