Home » JVM Languages » Ceylon (page 3)

Ceylon

Constructors in Ceylon

Since the earliest versions of Ceylon, we’ve supported a streamlined syntax for class initialization where the parameters of a class are listed right after the class name, and initialization logic goes directly in the body of the class. class Color(shared Integer rgba) { assert (0 <= rgba <= #FFFFFFFF); function encodedValue(Integer slot) => rgba.rightLogicalShift(8*slot).and(#FF); shared Integer alpha => encodedValue(3); shared ...

Read More »

Programming with type functions in Ceylon

I’ve recently been working on some experimental new features of Ceylon’s already extremely powerful type system. What I’m going to explain in this post is known, technically, as: higher order generic types (or type constructor polymorphism, or higher kinds), and higher rank generic types (or rank-N polymorphism). Please don’t worry about this jargon salad. (And please don’t try to google ...

Read More »

Unique approach to observer/observable pattern in Ceylon

The essence of the famous observer/observable pattern is that you have an observable object that produces events of various kinds, and one or more observer objects that register themselves as interested in notification when these events occur. Of course, we represent each kind of event as a type, usually a class, though nothing prevents us from using an interface type ...

Read More »

Tuple and entry destructuring

The next release of Ceylon features an interesting range of new language features, including constructors, if and switch expression, let and object expressions, and destructuring of tuples and entries. In this post, I’m going to describe our new syntax for destructuring. A destructuring statement looks a lot like a normal value declaration, except that where we would expect to see ...

Read More »

Useless lying version ranges

A frequent request from the Ceylon community is support for version ranges in expressing module dependencies. There’s no doubt that our current module system is too inflexible in terms of dependency resolution in the face of version conflicts, and I have some reasonable ideas about how to address that problem without needing version ranges. But I would like to document ...

Read More »

Ceylon: Ceylon command-line plugins

With Ceylon we try our best to make every developer’s life easier. We do this with a great language, a powerful IDE, a wonderful online module repository, but also with an amazing command-line interface (CLI). Our command line is built around the idea of discoverability where you get a single executable called ceylon and lots of subcommands that you can ...

Read More »

Ceylon: Planning the future of Ceylon 1.x

With the release of Ceylon 1.1, we’ve reached a point where we need to do some serious thinking about what are our priorities for the development of Ceylon 1.1.5, 1.2, and beyond. I definitely don’t yet have a crystal clear vision of what is going to be in 1.2, so we’re also looking for community feedback on this. I do ...

Read More »

Typesafe APIs for the browser

A new feature in Ceylon 1.1, that I’ve not blogged about before, is dynamic interfaces. This was something that Enrique and I worked on together with Corbin Uselton, one of our GSoC students. Ordinarily, when we interact with JavaScript objects, we do it from within a dynamic block, where Ceylon’s usual scrupulous typechecking is suppressed. The problem with this approach ...

Read More »

Write in Ceylon, Deploy as OSGI, use in JEE

… or how to use Ceylon inside Java EE application servers. The Ceylon language is inherently modular, and is shipped with a complete infrastructure that allows leveraging this modularity out-of-the box. However Ceylon is not captive of its own infrastructure. After the Java and JS interoperability efforts, the 1.1.0 version has brought out-of-the-box compatibility with OSGI, which enables running Ceylon ...

Read More »