When comparing Ruby vs Ceylon, the Slant community recommends Ruby for most people. In the question“What is the best programming language to learn first?” Ruby is ranked 5th while Ceylon is ranked 35th. The most important reason people chose Ruby is:
Ruby has a very clean syntax that makes code easier to both read and write than more traditional Object Oriented languages, such as Java. For beginning programmers, this means the focus is on the meaning of the program, where it should be, rather than trying to figure out the meaning of obscure characters. presidents = ["Ford", "Carter", "Reagan", "Bush1", "Clinton", "Bush2"] for ss in 0...presidents.length print ss, ": ", presidents[presidents.length - ss - 1], "\n"; end
Ranked in these QuestionsQuestion Ranking
Pro Clean syntax
Ruby has a very clean syntax that makes code easier to both read and write than more traditional Object Oriented languages, such as Java. For beginning programmers, this means the focus is on the meaning of the program, where it should be, rather than trying to figure out the meaning of obscure characters.
presidents = ["Ford", "Carter", "Reagan", "Bush1", "Clinton", "Bush2"] for ss in 0...presidents.length print ss, ": ", presidents[presidents.length - ss - 1], "\n"; end
Pro A large ecosystem of tools & libraries
Ruby has a large ecosystem of tools and libraries for just about every use. Such as ORMs (Active Record, DatabMapper), Web Application Frameworks(Rails, Sinatra, Volt), Virtualization Orchestration(docker-api, drelict), CLI tools(Thor, Commando), GUI Frameworks(Shoes, FXRuby) and the list goes on. If you can think of it, there is probably a gem for that ( and if not you can create your own and share with the community).
Pro Widely used
Ruby is one of the most popular languages for developing web sites. As a result, there's an abundant amount of documentation, sample code, and libraries available for learning the language and getting your project up and running. The most popular features are just 'gem install' away. Additionally, it is easier to find Ruby jobs because of this.
Pro Ruby on Rails
Lays out an easy to follow and opinionated MVC pattern that teaches best practices through necessity.
Pro Newbie-friendly community
Pro Hugely object oriented
Object oriented programming is one of the most important concepts in programming.
Pro Test Driven Development, #1
It's the fore-runner and trend setter for TDD.
Pro Strong static typing, null safe and flexible, almost dynamic type system
The compiler prevents you from using a potentially null variable, unless you check it is not null. Ie. it forces you to check a potentially null value before using it.
The type system is strict, but flexible, allowing union and intersection of types, covariant and contravariant types, reified types, etc.
Type inference and union types allows a dynamic programming style, close of JS spirit.
It brings type safety to JS, allowing to define interfaces to existing JS APIs, yet using the
dynamic keyword for flexible calls in the JS ecosystem.
Pro Excellent IDE support
Ceylon has reified generics, so it doesn't loose the type of collections at runtime. This makes autocompletion, debugging, etc. first-class. The Eclipse plugin makes it a full-fledged Ceylon IDE, and an IntelliJ IDEA plugin is in the works.
Pro Great tutorial
Gavin King, main author of the language, has a great, clear technical writing style, making understandable difficult concepts like variance or sound type system.
Pro Try it out in the browser
It has a Web IDE: http://try.ceylon-lang.org/ with impressive demos: http://try.ceylon-lang.org/?gist=bd41b47f325b6d32514a so you can try it without installing anything, and see the JS generation / interop in action.
Pro Excellent documentation
The language specification is very complete and up to date; also, the language module is very well documented.
Pro Easy to learn even if you don't have prior programming experience
Ceylon is indeed fairly easy and readable. Of course those ones who know OOP and a bit of functional programming concepts will feel almost at home right from the start.
Pro Generate HTML
HTML generation is supported right in the SDK.
Pro Same code in backend and frontend
Con Its ecosystem is limited outside of web development
If you're looking to host, generate, manipulate or secure a website, Ruby is your language. There's also some great support here for infrastructure as code work via Chef. However, it just doesn't have the depth and breadth that Python does. Things like native UI development, high performance math, and embedded / small footprint environments are barely supported at all in Ruby-space.
Con Meta-programming causes confusion for new developers
The ability for libraries to open classes and augment them leads to confusion for new developers since it is not clear who injected the functionality into some standard class.
In other words, if two modules decide to modify the same function on the same class can introduce a number of issues. Mainly, the order in which the modules are included matters. Since you more or less can't tell what kind of "helper" functions a module might write into any class, or for that matter, where the helper function was included from, you may sometimes wonder why class X can do Y sometimes but not at other times.
Requiring a library can change the rules of the language. This is very confusing for beginners.
Con No docstrings
It's hard to access Ruby's documentation from the REPL (irb), unlike Python, Lisp, and Smalltalk which let you ask functions how to use them, which is a great benefit to the beginner, and which also encourages you to document your program as you code it.
Con Arcane grammar based on Perl
Ruby is too complicated for beginners:
- arcane Perlisms;
- semi-significant whitespace;
- parentheses are not necessary around method arguments, except for sometimes they are;
- control constructs could be elegantly implemented with block like Smalltalk (Instead they're baked into the grammar.);
- verbose block syntax, unless it happens to be the last argument. (proc lambda).
- There are too many exceptional cases and arcane precedence rules.
Con More than one way to do it
A problem inspired by Perl. The core API interfaces are bloated. There's at least four different ways to define methods. More is not always better. Sometimes it's just more.
Con Dynamic type system
Majority of bugs could be resolved with types.
Con Viewed as a web development language
Despite its flexibility and performance, Ruby is often seen as being unsuitable for other tasks by those who are not familiar with it. As such, a lot of discussion about it centers around Rails, which is not at all relevant if you're using Ruby for something else, such as game development.
Con Does not teach you about data types
Since Ruby is a dynamically typed language, you don't have to learn about data types if you start using Ruby as your first language. Data types being one of the most important concepts in programming. This also will cause trouble in the long run when you will have to (inevitably) learn and work with a statically typed language because you will be forced to learn the type system from scratch.
Con Focus on Object-Oriented Programming (OOP)
Focussing on OOP in a beginner stage is an easy and popular plan, but not the best one.
Con Lack of physical or electronic books
We should hope Red Hat or anyone interested would take the time and write one. That would strengthen the maturity of the language, but Ceylon is rapidly developing which can make the author's efforts futile because his or hers work will become obsolete soon.
The second hindrance is, of course, popularity of the language which can't give much to the pockets of the author (however, Dart's unpopularity at start didn't prevent it to have a lot of printed material, but that's Google's child, we know).
Con Currently has large runtime
Ceylon 1.2 needs a language runtime of 1.55 MiB, and the Collection library adds another 370 KiB. That's a lot for the Web...
Now, this has to be put in perspective: if you use Ceylon to make a web application, these files will be loaded once, then cached by the browser (that's not casual browsing).
Moreover, most servers compress such resource, and the numbers become respectively 234 KiB and 54 KiB, which is more reasonable...