Ruby, Clojure, Ceylon: Same Goal, Different Results
snydeq writes "Charles Nutter, Rich Hickey, and Gavin King each discovered that 'simplicity' doesn't mean the same thing as they developed Ruby, Clojure, and Ceylon, respectively. 'Languages that are created with similar goals in mind may yield highly disparate final results, depending on how their communities understand those goals,' writes Andrew Oliver. 'At first, it surprised me that each language's creator directly or indirectly identified simplicity as his goal, as well as how differently the three creators and their languages' communities define what simplicity is. For Ruby, it is about a language that feels natural and gets out of your way to do what you want. For Clojure, it is about keeping the language itself simple. For Ceylon, it is a compromise between enabling the language to help, in King's words, "communicating algorithms to humans" and providing proper tooling support: the same general goal, three very different results.'"
3..., 2..., 1... Go! :)
Where is the information about Ruby or Ceylon? There are Clojure code snippets designed to illustrate the Clojure philosophy of "simplicity," yet no equivalent Ruby or Ceylon code. Overall, this article seems to be devoid of content...
Palm trees and 8
If it gains traction, then it will have to deal with feature creep (keeping up with the new hot languages), standard library bloat, backward compatiblity, and differing interpretations of the spec by compilers and developers. Then it becomes no longer simple.
Java is the classic example. It's hard not to giggle or mutter "WTF?" when you read Sun's original positional paper claiming the language was "simple".
This makes me mad to see a link to an article about "9 top languages", in which some major (established) players of the field such as Haskell or OCaml are not mentioned, while languages-to-be get some nice coverage.
Creating a programming language boils down to being fashionable, rather than doing something neat.
And yet none of these languages is actually simple. Ruby is readable and consistent, Clojure is sparse but confusing, and Ceylon is unknown (ok, maybe it's simple, but I'm not going to learn it to find out).
"First they came for the slanderers and i said nothing."
Sorry. In my head, "simple" and java is incompatible.
Simple leads to different results because it usually means something more like "quality". Simple is in itself not an absolute value. Instead, the simplicity of something is a ratio of its value to its sucking. So what they're really saying is "I'd like to achieve high value outcomes with the least amount of sucking along the way." There's a lot of ways to do that.
If it gains traction, then it will have to deal with feature creep (keeping up with the new hot languages), standard library bloat, backward compatiblity, and differing interpretations of the spec by compilers and developers. Then it becomes no longer simple.
My judgement is, simple things should have simple codes.
Of course, what do "simple" means is always subject to debate, as discussed in the article.
Is it simple to read by human? read by machine? debug?
But then they forgot one thing: NEVER underestimate humans stupidity.
Most language designers don't forget - they either assume you can handle the responsibilities of the language + the consequences of it's misuse, or they just don't care (which can be prompted by a variety of things: egomaniac, overly opinionated, semi-retarded, etc.)
Well, from my understanding changing times/styles also contribute to this. Wasn't C once considered a relatively "high" language when it first emerged and is now more of a "middle" language?
Compared to rubbing two sticks together or use of flint matches are "simple", but now we have lighters.
by Anonymous Coward: I, for one, welcome the shift from car analogies to pizza analogies. um.. overlords?
Rich Hickey's keynote talk from Strange Loop: Simple Made Easy. Unlike the posted fluff article, this talk is easily the most insightful talk you've seen this year, or your money back.
Matz designed Ruby with "principle of least surprise" in mind. No, not for you. you might be surprised or not. It's whatever causes least surprise to the creator Matz. 8D
I remember C was touted as being "lightly typed" back in the day, when compared two of its main rivals PL/1 and Pascal. In retrospect I'm not really sure what that meant, except that it seemed "low ceremony" and less verbose compared to its main rivals at the time, Pascal and PL/1. Blocks were delimited by curly braces instead of begin/end, arrays could be initialized as part of the declaration, most identifiers were lowercase by convention, etc.
Also, specification of data types was optional in some cases, for example, the return type of a function. And casts could be used freely for type conversion. Some of this stuff was tightened by ANSI C (following C++).
Java is the classic example. It's hard not to giggle or mutter "WTF?" when you read Sun's original positional paper claiming the language was "simple".
It was, and still is, simple compared to C++, or ADA.
Although at the time, there was the quote "Claiming Java is easier than C++ is like saying that K2 is shorter than Everest." And there is some truth to that.
"First they came for the slanderers and i said nothing."
One way I look at programming is as a form of decision compression. Instead of writing a zillion "if then" statements to solve a problem, you write a lot fewer statements.
;).
Just as there is no compression algorithm that's best at compressing all data, it will be unlikely for anyone to come up with a "decision compression language" that will be the best at compressing "everything". To make things more complicated, you often need to change certain stuff in the future, so you shouldn't pack everything too tightly, even if the language allows it.
Last but not least, I prefer a language not because of the code I need to write, but because of all the code I won't need to write ( and debug and document etc). In other words - the libraries and modules are important. Even if a language is very good and simple, and you only have to write one third the lines to do something, it still is not as good if you have to write everything you may need (database connectors, xml parsers, web clients, big number support, strong crypto, etc). In contrast a language that is 3 times more verbose but has libraries for nearly everything you need would actually result in you writing a lot fewer lines, and if the libraries aren't crap, supporting, documenting a lot fewer lines.
So a language that makes my life simple, isn't necessarily a simple language
Stop looking under the lamp post for the keys.
Seastead this.
In should be common knowledge that Matz developed Ruby. Charles Nutter and others developed jRuby, an implementation of Ruby on top of Java. That was more than 10 years after Ruby was born. Slashdot summary again.
"Wasn't C once considered a relatively "high" language when it first emerged and is now more of a "middle" language?"
No, C has never been considered a "high level" language in the Computer Science world, when compared to its predecessors such as BASIC and PASCAL. (Say what you want about BASIC, but it *is* a high level language, and vastly more so today than when it first appeared.)
People who insist that C a "high-level" language (you did not do that) make me cringe. At best, C is a "mid-level" language, lying somewhere between a high-level language and Assembly.
At least a language like Clojure is different. What gives me the most problem as a developer is the fact that most languages these days are sort of like C, C++, and Java but different. I can't easily remember how to do something in any given language. I want to take the length of a string, for example, or use an array, and just draw a total blank. len()? length()? strlen()? string.len? string.length? string.len()? string.length()? Who knows? Run the compiler/interpreter and see if it accepts the syntax. Do I put the brackets with the type or the variable when I want an array? Does this language use angle-bracket types for containers? Too many languages are similar, but they're different in small ways, and that causes a lot of cognitive dissonance if I have to switch.
C was considered high level language a long time ago. There was a time when anything more than mnemonics for machine instructions was called "high level".
I'm not sure that C is that old. FORTRAN, COBOL, and LISP (and a number of others) are all older than C and are higher level than C. Not to mention that the LISP enthusiasts probably consider all other languages to be lower level languages.
un-ALTERED reproduction and dissimination of this IMPORTANT information is ENCOURAGED
Clojure has very powerful lockless/lockfree concurrency and it's amazingly simple to use. You cannot deadlock Clojure programs: that has to count for something in this day and age of multicores CPUs.
The Rich Hickey also created something else that is totally fascinating: it's some sort of a DB abstraction layer that provides a CRA DB (Create Read Append). There's no Update and no DELETE. It's fully ACID. It can work on top of DBs stored in the cloud on a shitload of servers, it can work in-memory, it can work over PostgreSQL etc.
And you can do queries like: "What would this query have returned as a result if I had executed this query at this particular time in the past?"
This is the future. I'm not saying it works for every single DB use case but it definitely can replace most CRUD DBs out there.
If you've never watch a video by Rich Hickey I really suggest you to Google it: he's a good speaker and he's obviously a very, very, very smart person.
Now of course Clojure is a Lisp dialect so people are going to whine about your father's parentheses... The very funny part regarding this of course is that seen that how few lines of code you typically need in Clojure compared to some bracket-syntax language you basically always end up with less parentheses for a task done in Clojure than for the same task done with Java / C++ / C# etc.
; )
It must have been a real long time ago as I did wrote win98 vxd in C and in high level assembly (assembly with complex macros, but not more complex than recursive substitutions). My C driver, that did the exact same thing as my HLA one, was bigger and less understandable than other one. It was that way since function pointers get rapidly ugly. A big contrast to assembly where there are no types, only words sizes and alignment.
According to my anecdotal knowledge, C is only an ubiquitous portable assembly language; nothing more, since a good set of macros in assembly can be more terse than C if you target only one type of CPU.
Jehovah be praised, Oracle was not selected
In the 1980s, C was considered a high-level assembly language.
"I don't know, therefore Aliens" Wafflebox1
Not in the CS world, but EEs definitely do consider C a high-level language.
"For Clojure, it is about keeping the language itself simple."
No, it is not. It is about simplicity and flexibility of composing small pieces of code into complex software systems, something most languages and toolkits seriously suck at. The nice thing about Clojure is that its principles are so easy to grasp - data don't change while you're looking at them, and operations on these data can be arbitrarily composed because they only take a value in and produce a value out. That's all, after using it for a while I wonder why languages weren't like this from the beginning.
The language itself, while simple, is more complex than many other Lisps. OTOH, it is much simpler than Haskell, which has similar goals (among many many others).
"Win98" and "a long time ago" have no business being remotely close to each other -- when we're talking programming language lineages, many of the developments still interesting today happened between the 60s and the 80s, and some (LISP) date back to the 50s.
Now get off my lawn!
You are very right.
May I recommend Paul Grahams "On Lisp"?
Use of functional programming, and macros to build dsm's reduces the code you need to write, and can simplify things.
You then need good ffi (foreign function interfacing) to utilize external libraries.
My favorite system (currently) is Gambit-C Scheme. It supports define-macro as well as hygenic macros. It compiles to C, so the ffi is simply writing "in-line" C code if needed. Best of all is it has a 20 year history behind it.
Just another "Cubible(sic) Joe" 2 17 3061
"I'm not sure that C is that old. FORTRAN, COBOL, and LISP (and a number of others) are all older than C and are higher level than C."
This is precisely what I was saying. It came later, but was lower-level.
And it was, for the specific purpose of being more performant. It is not easier to use, it is not "simpler" to learn to use wisely. It is just more efficient at the compiled level, which being drastically less "efficient" at the code level. Personally, I can barely stand to look at it.
"According to my anecdotal knowledge, C is only an ubiquitous portable assembly language; nothing more, since a good set of macros in assembly can be more terse than C if you target only one type of CPU."
I would tend to agree with this. That was exactly the purpose of C. It wasn't "high level", but it played well cross-platform while Assembly did not. So it was "higher level" than Assembly, in that it abstracted out much of the hardware interface.
I prefer perl instead of Lisp for reasons I gave in my second last paragraph. I find it easier to find and use the libraries (CPAN). Yes there's cliki but it's far from as good - problem/domain coverage, documentation etc.
Java combines the natural and easy syntax of C with the blazing speed of Smalltalk.
*Tadum* *Crash* *Thud*
Thank you, thank you, I'm here all week. Try the fish and tip your waitor.
We suffer more in our imagination than in reality. - Seneca
C is absolutely fairly and squarely a high level language.
What features do Pascal and Fortran and Cobol have that make them high level and C not?
All I want is a secure system where it's easy to do anything I want. Is that too much to ask ~~ Randall Munroe