Red Hat Releases Ceylon Language 1.0.0
First time accepted submitter Gavin King writes with news that the Ceylon language hit 1.0 "Ceylon 1.0 is a modern, modular, statically typed programming language for the Java and JavaScript virtual machines. The language features, an emphasis upon readability and a strong bias toward omission or elimination of potentially-harmful constructs; an extremely powerful type system combining subtype and parametric polymorphism with declaration-site variance, including first-class union and intersection types, and using principal types for local type inference and flow-dependent typing; a unique treatment of function and tuple types, enabling powerful abstractions; first-class constructs for defining modules and dependencies between modules; a very flexible syntax including comprehensions and support for expressing tree-like structures; and fully-reified generic types, on both the JVM and JavaScript virtual machines, and a unique typesafe metamodel. More information may be found in the feature list and quick introduction."
If you think Ceylon is cool, you might find Ur/Web interesting too.
One of the few languages in recent times with an interesting type system which isn't just a trivial rehash of existing (in practice) ones.
HAND.
Like that comma?
Confucius say, "Find worm in apple - bad. Find half a worm - worse."
I'm sorry, I'd really like to be interested by this, but the second and last sentence is just the usual marketing bullshit that each newest language has been serving us in the past years.
So, here comes the usual question we always end up asking when such a thread shows up: could you give us a simple and clear explanation of what is so good about it as well as the traditional comparison of advantages/disadvantaged of this language with other similar ones.
Thanks
The Internet
There are to many programming languages.
Why would anyone want to learn yet another language? What's the benefit for people to invest more time into learning a language?
.. ?
I understand the basics of a language are usually pretty easy to pick up: read the syntax quick sheet, and you are good to go. But it still means a drop in productivity for a while.
What makes them think people will want to use this? I guess, they already have enough users, since this is a version 1.0 release
Reading the language description, I don't see anything notably distinct from Scala. If anything, Ceylon seems a bit clunkier. The one upside appears to be baked in translation into JS, but others have already provided a Scala -> JS parser.
*puts on sunglasses* ..but its no c++
This fits only partially with the long tradition of companies creating languages. C started at AT&T, JavaScript started with Netsscape, Java came from Sun.
What's missing is that it isn't shipping with some other major system. C had Unix. JavaScript had the browser. Java had Sun's server ecosystem.
This isn't shipping with something everybody uses, so it might have a hard time. Compare and contrast with BASIC shipping on 8-bit computers. BASIC sucked; but it was there so you used it.
The other great language tradition is individual programmer itch-scratching (Ruby, Perl).
This one doesn't seem to fit well with either tradition. Union types and a cleaner version of XML inside the language don't seem to be that compelling. I think obscurity is a safe bet; but then it usually is for new languages.
Shouldn't it be Sri Lanak?
In the land of the blind, the one-eyed man is king.
Ceylon developers wanted with at least 5 years experience with the language.
Submit your resume till December 1st, 2013...
I think, therefore you are.
Since Ceylon seems to be Java inspired, I looked for a comparison of the two but didn't find one. Wikipedia's entry about it says, "The project is described to be what a language and SDK for business computing would look like if it were designed today, keeping in mind the successes and failures of the Java language and Java SE SDK." That nice, but can anyone here supply some details?
Ur/Web is really, really, really cool! I don't see what it has to do with Ceylon though - a better link would have been to Scala or to Kotlin.
>combining subtype and parametric polymorphism with declaration-site variance, including first-class union and intersection types, and using principal types for local type inference and flow-dependent typing; a unique treatment of function and tuple types, enabling powerful abstractions; first-class constructs for defining modules and dependencies between modules; a very flexible syntax including comprehensions and support for expressing tree-like structures; and fully-reified generic types, on both the JVM and JavaScript virtual machines, and a unique typesafe metamodel
But how do I make it *do* something?
It's all very well being able to lock down what something is, but programmer cannot live on types alone.
I should use this sig to advertise my book ISBN-13 : 978-1501515132.
I have no interest in a new language that has concurrency story at all.
Any new language needs to address the biggest development challenge of this time - coding for multiple cores.
Any language that states as a goal: omission or elimination of potentially-harmful constructs, but keeps the awful C construct:
...
if (x = 3)
{
}
is not really serious about elimination of harmful constructs.
3.14 * 10 == 3.140?
(And what would that have to do with anything anyway? And actually, the popularity of the phrase "You're comparing apples to oranges!" shows that, actually, people do think in types, and get annoyed when others treat one type as another unthinkingly.
You are not alone. This is not normal. None of this is normal.
"Cylon" language.
That would be a mixed blessing. On the downside, near-genocide by a treacherous world-wide WMD strike. On the upside, a chance to score some hot skinjob action.
Nah, who am I kidding. No Cylon is that desperate for anything (secrets, access, weird geek fetishes).
People can learn to think in types. But that's a learnt ability, not a natural one.
Don't stop where the ink does.
Really? So when someone goes to the supermarket, puts 5 oranges in their cart, they wouldn't notice if the store manager were to wait until they're not looking, and replace the oranges with peanuts?
People actually think in types ALL THE TIME. You have to unlearn types as part of the process of learning how to program, learning how to turn real world situations into generic rules.
So no, you have it totally wrong. Yes, type safety trips up many programmers, although for the most part it's not that they can't understand it, or fail to know what to do when their program doesn't compile, it's just annoying being reminded there's a bug in their app.
You are not alone. This is not normal. None of this is normal.
Like javascript? 1+2 = 12?
If you are not going to have strong types, then you must use a different operator for string concatenation vs. math. The above is one reason I can't stand javascript.
...line.
...for Python.
I can continue to completely ignore the incredible, writhing mess that is java and its ecosystem.
Go ahead, mod me down, then go back to fighting with Java. I'll just continue being productive. :)
I've fallen off your lawn, and I can't get up.
In Perl: my $x = 1 + 2; my $y = '1' . '2'; Yup, not using arithmetic operators for anything but arithmatic is a good idea.
Don't stop where the ink does.
People do not think in types.
Piaget would disagree with you.
http://en.wikipedia.org/wiki/Schema_(psychology)
(no sig)
Hi, I'd like to hire a Ceylon Developer. It's entry level for $10/hour. They just need 5+ years experience.
mkay, thx, goodbye.
- HR
Consider: int x; What happens here? x = 3.1415; Does x hold the correct value? No. But if x was a scalar, then: x = int( 3.1415 ); says exactly what is happening. Type safety places restrictions on what can be done and programmer have to memorize the rules because they're not natural to his thinking. It's because of all the things that programmers have to memorize that programming is hard. The more things a programmer have to remember, the more bugs he will create. Having to write int() every time he wants an integer: 1. decreases bugs, and 2. makes the code more readable. Types are not natural; they were created to make compiler writing easier. They do not make programming easier, just the opposite. They make programming harder because the force the programmer to remember more things.
Don't stop where the ink does.
I'm not sure these schema are restrictive enough to be a type in programming.
Don't stop where the ink does.
Speak for yourself. Like most people I learned the difference between integers and reals, and between numbers and the notation for numbers, before high school.
Haven't you heard! We discuss this all the time behind the bike shed!
I am curious as to Red Hat's practical motivations for creating this language. Specifically, do they plan on integrating it in their existing business or projects in any way?
(no sig)
elimination of potentially-harmful constructs
When did English speakers fall in love with the word potentially?
We already have a single word for potentially harmful: it's called dangerous.
Even worse is the infestation of the phrase could potentially, which means the same thing as could.
adding the '0' is not natural, it's a learned trick.
I'd argue that multiplication beyond adding stones and counting isn't natural though.
Wow, sent an e-mail as suggested when clicking on "use classic" banner, and got a fast response that addressed my msg
People can learn to think in types. But that's a learnt ability, not a natural one.
So fractions and decimals are a natural way to think? Most kids in the earliest grades could disabuse you of that notion.
Consider: int x; What happens here? x = 3.1415
Hopefully you get an error.
BTW, you rounded wrong. Pi to 4 decimal places is 3.1416. However, in order to round 3.1415926 to 4 decimal places "correctly", you should specify the exact type of rounding you want to use. In that case it probably wouldn't matter, but there are plenty where it does. The cumulative effect of rounding a number of numbers can be significant (pun intended).
It's because of all the things that programmers have to memorize that programming is hard.
People learn the difference between integers and reals in grade school.
Having to write int() every time he wants an integer: 1. decreases bugs, and 2. makes the code more readable.
That's an argument for static typing. It forces you to specify that you're converting between a float and an int. Better yet if the function used to convert specifies the type of rounding, rather than the C style "I guess that cast truncates - what about negative numbers?".
Types are not natural; they were created to make compiler writing easier.
On the contrary. The easiest thing in the world is to specify implicit conversion rules, as C is so full of. Newer languages took that out for the sake of the programmers.
Yet Another Brace Language
In programming, our challenges includes some tightly coupled issues. Identifying and removing errors to large programs and keeping code complexity to a minimum. Strict typing usually eliminates a number possible errors. Unexpected autoboxing is one of them, depending on the strength of the type system. You describe adding a 0 to a string, which is how people think for a simple domain. A type is a domain. An int will (in most languages) not contain .01 nor 1i nor A. Representative values notwithstanding. So I understand your point, but I disagree that people do not think in types.
Strict typing, for the most part, increases notation complexity in naming (z = ArrayList[T,H,G] vs y=ArrayMap[L,P], ad nauseam) and an added layer of boilerplate conversion code/functions for moving between types explicitly. I'm really surprised there aren't more PHDs getting proper staticians to correlate this from the glut of Java code flying about. This is a tradeoff any time you trade compiler checking for the conversion code that had to be written to support the types being used. You have to decide if that's worth the cost of a programmer's time (let's not talk about the programmer's sanity). I think it's a great tradeoff, in many languages. Type systems aren't trivial to maintain in a language and I don't envy maintainers.
Some languages are still developed saying they don't have a strict type system. While I don't have an example for Perl, PHP definitely has a demonstrable wishy-washy type system, it's just hidden from most developers. // error! because $z is a float
$z=1.5*2;
$y=array(1,2,4,5);
$t = array_key_exists($z,$y);
Since you can't have float keys, where's the autobox there? Another function, array_slice, doesn't care and converts it to int.
At some point the compiler has to figure out if the value is representative or not. Every language has a strict type system at some level so, I have to disagree that it's brain dead to have one.
The question is, should it be a tool for the programmer to ensure code correctness or just a set of rules that usually ignore? One leads to, among other things, more robust and reliable large systems with an added benefit to prolonging the useful life of a programmer (old programmers usually end up in java because the compiler/IDE catches many problems) and the other path can lead to more rapid development, more intimate knowledge of the language to avoid behaviors like subtle bugs, and more flexibility in reusing code. Instead of a bunch of utility methods or conversion code for handling different possible types, you just use 1. I prefer languages without type systems because I primarily write and work on smaller systems, but I see the value in larger projects that use them. I'm not sure it's useful to call one side weaker than the other where there's no solid criteria for what's "best".
Often wrong but never in doubt.
I am Jack9.
Everyone knows me.
Unless Gavin King grows some serious facial hair, Ceylon is a doomed language.
In theory, practice and theory are the same. In practice, they're not.
PHP is like BASIC: it's there so you use it. I can think of a few entry-level shared web hosts that support PHP but not Perl, Python, Ruby, or Java "for security reasons".
Sri Lanka was Ceylon
Now it's Sri Lanka, not Ceylon
Been a long time gone, Ceylon
Now it's subcontinental delight on a moonlit night
Every gal in Ceylon
Lives in Sri Lanka, not Ceylon
So if you've a date in Ceylon
She'll be waiting in Sri Lanka
The fact that Gavin King (of Hibernate fame) is heading up the project is terrible news. The guy has a horrible track record of disparaging users for report bugs. Definitely not professional, and a sure way to burn a community.
Now ask someone to add a number of dollars to a temperature. They will respond type error.
Most people consider decimal to have a string interface, which is not incorrect.
Nah. They'd babble incoherently, and then resort to calling me poopy-head for not agreeing with their assertion that they should be able to exchange their orange for a candy-bar.
A hammer ia a natural tool for bashing nails. That doesn't do much for keeping a beginner's thumbs from being sore..
That being said, those people who get too involved in types are as dangerous as those who want to get rid of them entirely.
The language features, an emphasis upon readability
Not inserting superfluous commas, would be a good place to start.
systemd is Roko's Basilisk.