4 ms·
Ok, that was painful to read by moments. "Ruby is probably the most powerful programming language on the planet for creating DSLs, or domain specific languages
by Hexstream 18y ago
Ok, that was painful to read by moments.
"Ruby is probably the most powerful programming language on the planet for creating DSLs, or domain specific languages."
If Ruby has anything over Lisp in the DSL domain (besides popularity), I'd love to know.
"A web development platform as powerful and syntactically concise as Rails could only have been done in Ruby."
Idem.
"This power does not come without a price. Ruby is slow. Ruby is generally recognized as being twice as slow as Python, and at least an order of magnitude slower than C++ or Java. Charles Nutter, one of the creators of the JRuby VM for the Ruby language, recently posted an article about optimizations that could be made to the VM, and he improves Ruby performance by as much as twenty times by removing much of Ruby’s power and breaking compatibility. If anything, it shows us skeptics that there is no such thing as a free lunch."
Lisp has all (?) the crazy features you love so much about Ruby and more, yet it's very fast (try SBCL, it compiles to native x86).
- beza1e1 18y agoRuby has an advantage over Lisp: syntax Many programmers like syntax, since coding AST-style can be tedious sometimes. Sure, you can create your own reader macro with Lisp, but that is harder than overriding some methods in Ruby. Rails is an example that opinionated software has an edge sometimes and Ruby compared to Lisp is opinionated in terms of syntax.
- Hexstream 18y agoI don't see how the fact many programmers like syntax makes it better. I also don't see how "coding AST-style" can be tedious, especially since it's so much easier to automate the process with macros. Granted, you'll want an editor with support for s-expressions.
- rimantas 18y agoThe same way why ease of use of something makes that something better (or more pleasant to work with).
- joe_the_user 18y agoBingo for the parent! There are indeed some people who say "uh, nice syntax, readability, uh, big deal". Those are the folks who fail to grasp the point that programming is a human endeavor and that having your code read by other humans is a crucial element. Lisp may indeed attract a large group of nice, intelligent people who don't get this. That is a further, fatal problem in the language. Ruby has many problems itself but it gets that readability is important and it gets that, by extension, the humans relations that a programming language generates are important. Lispers don't seem to see the problem in an exclusive attitude and essentially closed community. The ruby community understands the need to have a good community open to people even if the Ruby community doesn't always succeed at this. It all comes together
- richcollins 18y agoLisp isn't quite as dynamic as Ruby, but Javascript certainly is, and it can be as fast as Java. I agree that Lisp is a better choice for DSLs than Ruby. If you want a very dynamic (late bound) language that is also fantastic for DSLs, have a look at Io (http://iolanguage.com/ http://iolanguage.com/).
- Hexstream 18y ago"Lisp isn't quite as dynamic as Ruby" ?! Please substantiate. And of course when I say "Lisp" I really mean "Common Lisp".
- icey 18y agoI'd also like some substantiation around the claim that Javascript can be as fast as Java.
- jamesbritt 18y agoRhino? I'm guessing; I have no numbers on how it compares to actual Java.
- sharkbrainguy 18y agoThat's like saying that ruby is probably as fast as c because the interpreter is written in c. http://tinyurl.com/daom93 http://tinyurl.com/daom93 - shootout numbers rhino v. java
- jamesbritt 18y ago"That's like saying that ruby is probably as fast as c because the interpreter is written in c." I was under the impression that Rhino was doing some compiling to byte-code (unlike what MRI does, but what perhaps like JRuby does). Live and learn.
- 18y ago
- ankhmoop 18y agoThis (and the rest of the article) is just ignorant cheerleading — an attempt to justify the lackings of the author's chosen technology, and thus resolve cognitive dissonance.