This fun fact has been on my mind for a while, and a recent reddit thread about "Smuggling Checked Exceptions with Sealed Interfaces" made me write this post here. Namely, Java had union types before it was cool! (If you squint hard). What are union types? Ceylon is an underrated JVM language that never really … Continue reading Java’s Checked Exceptions Are Just Weird Union Types
Tag: Union types
Ceylon Might Just be the Only (JVM) Language that Got Nulls Right
Here we go again. THAT TOPIC. But hang on. The approach discussed here (and in the Ceylon language) is not something you see every day. At the same time, it is very cunning. Nulls are baked into the language ... or so it may seem. Indeed, in Ceylon, like in Kotlin (and possibly many other … Continue reading Ceylon Might Just be the Only (JVM) Language that Got Nulls Right
An Ingenious Workaround to Emulate an Application of Union Types in Java
Before I move on with the actual article, I'd like to give credit to Daniel Dietrich, author of the awesome vavr library, who has had the idea before me: https://twitter.com/danieldietrich/status/699633269202149377 Contravariant Generic Bounds It all started with a tweet: https://twitter.com/lukaseder/status/699588908095508480 I wanted to do something like pattern-matching a common super type of a set of … Continue reading An Ingenious Workaround to Emulate an Application of Union Types in Java
Java 8’s Method References Put Further Restrictions on Overloading
Method overloading has always been a topic with mixed feelings. We've blogged about it and the caveats that it introduces a couple of times: You Will Regret Applying Overloading with Lambdas! Keeping things DRY: Method overloading Why Everyone Hates Operator Overloading API Designers, be Careful There are two main reasons why overloading is useful: To … Continue reading Java 8’s Method References Put Further Restrictions on Overloading
The Inconvenient Truth About Dynamic vs. Static Typing
Sometimes there are these moments of truth. They happen completely unexpectedly, such as when I read this tweet: https://twitter.com/whileydave/status/536422407297171457 David is the author of the lesser-known but not at all lesser-interesting Whiley programming language, a language that has a lot of static type checking built in it. One of the most interesting features of the … Continue reading The Inconvenient Truth About Dynamic vs. Static Typing
Top 10 Ceylon Language Features I Wish We Had In Java
What does one do when Hibernate is "finished" and feature complete and one needs new challenges? Right. One creates a new JVM language called Ceylon. On November 12, 2013, Ceylon 1.0.0 was finally released and we congratulate the whole team at Red Hat for their achievements in what looks like a very promising new JVM … Continue reading Top 10 Ceylon Language Features I Wish We Had In Java