Questions tagged [ceylon]

Ceylon programming language for Java and JavaScript virtual machines.

Ceylon is a modern, modular, statically typed programming language for Java and JavaScript virtual machines. The language features a flexible and very readable syntax, a unique and uncommonly elegant static type system, a powerful module architecture, and excellent tooling, including awesome Eclipse- and IntelliJ-based IDEs.

The Ceylon language is defined by a readable specification.

Since 'Hello World' is the traditional way to introduce a language, here's how it looks in Ceylon:

shared void hello()
        => print("Hello, World!");

To learn more, you can start with the quick introduction or take the in-depth tour of Ceylon.


Current release: 1.3.3 (Contents May Differ)

  • Ceylon is open source on Github
  • Ceylon 1.4 is under development including migration of the compiler to the Eclipse Foundation.

Ceylon is:

  • Powerful: Ceylon's powerful flow-sensitive static type system catches many bugs while letting you express more, more easily: union and intersection types, tuples, function types, mixin inheritance, enumerated types, and reified generics.
  • Readable: We spend more time reading other people's code than writing our own. Therefore, Ceylon prioritizes readability, via a highly regular syntax, support for treelike structures, and elegant syntax sugar where appropriate.
  • Predictable: Ceylon controls complexity with clarity. The language eschews magical implicit features with ambiguous corner cases. The compiler follows simple, intuitive rules and produces meaningful errors.

Ceylon offers:

  • A platform: Ceylon is a whole platform with amodern SDK designed from scratch. It runs on both Java and JavaScript virtual machines, bridging the gap between client and server. Ceylon is fully interoperable with Java and the Java SDK, and with JavaScript and its libraries.
  • With modularity: Modularity is at the very core of the language, SDK, and tooling. The compiler produces module archives which are then distributed via a next-generation repository architecture with Ceylon Herd as its social focus point.
  • And tooling: Static typing is the technology that enables killer tools. Ceylon comes with a complete command line toolset, and awesome Eclipse- and IntelliJ-based IDEs with searching, refactoring, quick fixes + assists, autocompletion, debugging, and much more.
114 questions
30
votes
3 answers

Reified generics in Scala 2.10

The lack of reified generics in Scala is the thing that bugs me the most about the language, since simple things cannot be implemented without using complicated constructs. Both Kotlin and Ceylon supports reified generics so its definitely possible…
Lars Tackmann
  • 20,275
  • 13
  • 66
  • 83
16
votes
2 answers

What advantages does Ceylon have over Java or Scala

Yesterday I saw the announcement from the Ceylon team that the first milestone release had been made publicly available. And from what I can see, it looks intersting. From looking at the information on Ceylon, its purpose seems largely in line with…
Codemwnci
  • 54,176
  • 10
  • 96
  • 129
9
votes
3 answers

How to write web applications using Ceylon?

Ceylon hitting 1.0 caught my attention lately. The most interesting feature is that it can be compiled for both the JVM and Javascript engines (node.js, browsers) so it makes code sharing possible from the beginning between the server backend and…
NagyI
  • 5,907
  • 8
  • 55
  • 83
8
votes
2 answers

Difference between List, Tuple, Sequence, Sequential, Iterable, Array, etc. in Ceylon

Ceylon has several different concepts for things that might all be considered some kind of array: List, Tuple, Sequence, Sequential, Iterable, Array, Collection, Category, etc. What's is different about these these types and when should I use them?
drhagen
  • 8,331
  • 8
  • 53
  • 82
8
votes
1 answer

No Ceylon runnable element

I try to use Ceylon, with Eclipse. I have installed the JDK. I have in my computer Java version 7 and 8. The configuration of Eclipse looks good, I can see the Ceylon perspective, create project, I have a Ceylon file with void hello() { …
Mary
  • 106
  • 4
6
votes
2 answers

Where would noop be used in Ceylon

I am playing around with this beautiful language and saw a function called noop. As the documentation says it's a void function that does nothing!! So why would I use a function that does nothing? Is it for adding "Nop" in assembly (for pipeline…
niceman
  • 2,653
  • 29
  • 57
6
votes
2 answers

Programming Android App using Ceylon

Can I create android app using Ceylon? Since Ceylon can run of any JVM, the implementation of Ceylon to create android app should be pretty simple as far as I understand. Is it like Scala where the size of App becomes considerably larger and have to…
Jack_of_All_Trades
  • 10,942
  • 18
  • 58
  • 88
5
votes
1 answer

Implement inner non-static interface

I would like to instantiate an an inner non-static interface from outside the wrapping class. Is this possible? Consider the following code: shared class AOuterClass() { Integer val = 3; shared interface AInterface { shared Integer val =>…
5
votes
2 answers

How to turn a Ceylon Sequential or array into a generic Tuple with the appropriate type?

I've got a generic function that needs to create a Tuple to call a function whose arguments I don't know the types of. Something like this (except array in this example is created by some external code, so I can't just apply the function…
Renato
  • 12,940
  • 3
  • 54
  • 85
5
votes
2 answers

Why would you create an Iterable instead of a Sequence in Ceylon?

I've read the walkthrough about sequences but I don't really understand why there is a way to define both a literal Iterable and a literal Sequence. {String+} iterable = {"String1", "String2"}; [String+] sequence = ["String1", "String2"]; Since…
KPD
  • 5,281
  • 4
  • 20
  • 19
4
votes
1 answer

The Ceylon Typechecker: How to obtain the typed syntax tree?

Im trying to programmatically use / embed the Ceylon Typechecker to analyse Ceylon source code. In this use case I want to access all the information that normally the compiler would consume. But Im not going to compile and Im not going to add…
user3464741
4
votes
3 answers

Break out of multiple for loops in Ceylon

Let's say I have I several nested for loops in Ceylon. How do I break out of all the loops: variable Integer? something = null; for (i in 0:3) { for (j in 0:3) { for (k in 0:3) { something = someFunction(i,j,k); if (something…
drhagen
  • 8,331
  • 8
  • 53
  • 82
4
votes
2 answers

Ceylon 1.2 Binary Compatibility

I tried to compile a source with Ceylon compiler version 1.2 that I previously compiled successfully with Ceylon compiler version 1.1 and I get the following error messages: source/com/example/helloworld/module.ceylon:2: error: version '1.1.0' of…
user3464741
3
votes
0 answers

What are the novel features of the Ceylon programming language

I know that it does not yet exists, but there is much talk and I wonder what the new features it hopes to brings to programming languages.
Eli Schneider
  • 4,903
  • 3
  • 28
  • 50
3
votes
1 answer

Satisfying the 'Iterable' interface without involving Null

I'm trying to create a class 'Gprogram' that satisfies the interface Iterable (such that I can iterate over the Gcommand's in my Gprogram). However, I can only make it iterable with the type Iterable where I would rather have…
user134055
1
2 3 4 5 6 7 8