Bio
Gavin King is a Distinguished Engineer at Red Hat. He's the creator of Hibernate, a popular persistence solution for Java and of the Ceylon programming language. He contributed to the Java Community Process as JBoss and then Red Hat representative for the EJB and JPA specifications and as spec lead and author of the CDI specification. He's currently a major contributor to the design of Jakarta Data and Jakarta Persistence. He lives in Barcelona with his wife and three daughters. His active interests include theoretical physics and quantum technologies.
Tags
Authors
Ceylon progress report
Hrm, I notice it's been just over three months since I semi-accidentally announced the existence of the Ceylon project, and I guess I feel like you folks deserve some kind of progress report! At the time, I very much regretted the fact that the project became public knowledge before I was really prepared to socialize it, but in retrospect it was the best thing ever for us. That's where we got Stef and Tako and Sergej and Ben from, along with the other folks who are signing up to get involved in development. Unfortunately, we're still working in a private github repo, which is certainly not ideal, but it's helping keep us focused on getting actual code written.
The case against do-while
So the comment thread of my previous post got me thinking again about the do/while statement. Frankly, it's difficult to see why we really need this as a first-class construct in modern programming languages. Here's my list of reasons for saying that.
A wrinkle in Java's do-while
Today I tried to write (approximately) this code in Java:
Sequences and sequenced parameters
I've been thinking about the problem of passing a Sequence of values to a sequenced parameter in Ceylon (a varargs
parameter in Java terminology). Consider:
Self types and type families in Ceylon
I've just finished implementing support for self types and type families in the Ceylon type analyzer. I think this stuff is pretty cool, if ever so slightly esoteric.
The dangers of extrapolation
One of the things most people are taught early in their scientific education is that extrapolation is unreliable. And yet it's always seemed to me that the tendency of the Human mind to extrapolate current trends to the unknown future is so reflexive that we barely notice ourselves or others doing it. A huge percentage of popular debate in many fields (politics, economics, culture, science) falls prey to this fallacy. The fallacy is especially visible right now in the totally debased discussion of the causes and effects of climate change. Few of the loud voices on either side of this discussion, no matter how many times they mention the word science
are actually doing anything remotely approaching a critical, sceptical, Popperian scientific method. It's the victory of Kuhn's description of science, but vulgarized to the level of cable news, and then repurposed for political ends. There's barely a word written on this topic that isn't dripping with confirmation bias. A plague on both your houses.
Type inference at module boundaries
Tuples, or not?
A number of people have asked if Ceylon will have tuples. Well, I suppose, why not? It's easy enough to write the following generalized algebraic datatype:
New approach to annotation constraints
Today I came up with an awesome new way to do annotation constraints in Ceylon, essentially using the metamodel types (yes, I mean the metamodel types, not the actual metamodel type instances) as a kind of query language for program elements. The advantages of the new approach are:
Uncurrying method references and more
A method reference like Float.times is represented in curried
form in Ceylon. I can write: