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
1
vote
2 answers

Ceylon compiler and VM

Are there any Ceylon specific VMs? Or do all available ceylon compilers produce JVM bytecode?
travega
  • 8,284
  • 16
  • 63
  • 91
0
votes
0 answers

Incorrect syntax error when calling Java function in Ceylon

I am following the tutorial here I get a syntax error when I call this code. native ("jvm") void hello() { import java.lang { System } System.out.println("Hello, world!"); } 4: error: incorrect syntax: no viable alternative at token 'out' …
Squanchy
  • 147
  • 1
  • 9
0
votes
0 answers

New Ceylon-project has un-openable 'module.ceylon'

Having just created a new Ceylon project ('POSTtoFile'), and within it a new ceylon module called 'server', I would like to open this file: POSTtoFile / source / server / server / module.ceylon in order to specify the dependencies of the server…
user134055
0
votes
1 answer

Ceylon Run Configuration: can't find project

I am trying to create a run configuration for a Ceylon project that I cloned from my remote repository. First step in making a run configuration is to identify the relevant project. I chose 'Open projects from File system' and opened the cloned…
user134055
0
votes
1 answer

Where is the math module?

The first import mentioned in the Tour of Ceylon is import math { sqrt, pi, Complex } What do I need to put in my modules.ceylon in order to be able to import this math module? It is not either of these: module my_module "1.0.0" { import math…
drhagen
  • 8,331
  • 8
  • 53
  • 82
0
votes
3 answers

How to test if collection contains all elements of other collection

With a Set in Ceylon it is straightforward to determine if one collection is a superset of the other. It's just first.superset(second). What's the best way to do the equivalent for an Iterable, List, or Sequential using multiset (or bag) semantics?…
drhagen
  • 8,331
  • 8
  • 53
  • 82
0
votes
1 answer

Calling a Ceylon toplevel function with type parameters from Java (or scala)

With shared T f(T t){ return t; } I expected something like mod.f_.f[Integer](1) to work in scala, where [Integer] is the type parameter. But it doesn't accept type parameters. And why does scala see a getter instead of a function for…
user3464741
0
votes
2 answers

Escaping module names with hyphen ceylon module descriptors

How can I escape the hyphen in a ceylon module descriptor? import com.fasterxml.jackson-core "2.8.4"; Edit: In this case the jar are downloaded and included in the correct file hierarchy of the local ceylon repository ./repo . So, I expect that I…
user3464741
0
votes
2 answers

Ceylon Higher Order Function

I have the code: shared Integer getInt() { return 42; } shared Integer() i1() { return getInt; } shared Callable i2() { return getInt; } shared Callable i3() { return getInt; } void run() { // OK …
0
votes
1 answer

Type-safe metaprogramming? Using strings to query ceylon.language for meta information?

There seems to be a mismatch between the return value of type.getAttributes() and the argument value of type.getAttribute() concerning the (qulified vs. unqualified) naming of the attributes: If the name of the attribute returned by getAttributes is…
user3464741
0
votes
2 answers

Ceylon plugin failed in Android Studio

I recently saw it article in infoq: https://www.infoq.com/news/2016/09/ceylon-13-android-support I installed the plugin in Android studio 2.2 without problems. But when In the Android view, Right-click on app > Configure Ceylon in this Module I got…
0
votes
1 answer

Interoperability between Ceylon and Java: How to share an import from 'ceylon.language'

I'm trying to epose a ceylon class derived from ceylon.interop.java { CeylonList } to a java unit (in ceylon terms this would be called a module, but java hasn't that yet) outside the ceylon module that contains this derived ceylon…
user3464741
0
votes
3 answers

Shortcut syntax when directly implementing an interface

Is it possible to implement the ceylon typechecker in such a way, that a class, that satisfies an interface directly (types in members signatures are the same as in the interface being satisfied), can omit types in its own members signatures? This…
user3464741
0
votes
1 answer

java.lang.ClassNotFoundException: com.redhat.ceylon.compiler.java.runtime.tools.Options

Using Ceylon IDE 1.2.1 and Vert.x 3.2.1: import io.vertx.ceylon.core { vertx_=vertx } shared void run() { value vertx = vertx_.vertx(); } module has shared import io.vertx.ceylon.web "3.2.1"; Run as Ceylon Java Application, results…
AxelW
  • 319
  • 1
  • 7
0
votes
2 answers

Combine DSL-like construstor call with anonymous class declaration

Is it possible? I tried something like this: object foo extends Foo { constructorNamedArg = "qqq"; } { abstractMethod() => bar.baz(); }
guai
  • 780
  • 1
  • 12
  • 29