Ruby, why the hype?
Author |
Message |
Drew416
|
Posted: Mon Mar 09, 2009 2:11 am Post subject: Ruby, why the hype? |
|
|
So I've been trying to teach myself Ruby for the past couple of weeks and I totally don't get what they hype is about. There is nothing in the language so far that can't be accomplished using more sane languages like Java/C++. The syntax and rules are just too lenient and vague. But the biggest problem is that (atleast from my experience) it brings nothing unique that the well established languages don't have nor does it present a more efficient way of doing things. If anything it's syntax only adds vagueness and is infuriating to deal with esp after having programed in languages which use the efficient 'C' based syntax. So once again why is Ruby getting so much hype? |
|
|
|
|
|
Sponsor Sponsor
|
|
|
wtd
|
Posted: Mon Mar 09, 2009 3:14 am Post subject: RE:Ruby, why the hype? |
|
|
Do you have any specific examples to offer of ways Ruby makes programming more difficult than in Java or C++?
As for unique...
Dynamic (or "duck") typing. Accomplish this in Java or C++ in a way that's even remotely natural and/or convenient. Of course, this idea is not unique to Ruby, but is so when compared to Java or C++.
Everything is an object. This is missing from either of the languages mentioned. Couple this with open classes and you can do really neat things that aren't possible in Java or C++ (or any other C-inspired language I am familiar with).
code: | 3.times do puts "I'm doing something three times!" end |
And because things like that are just methods, they behave according to very straightforward, consistent rules. Syntax extensions to a C-like language generally introduce new rules and thus, added complexity.
Show me a really good REPL (Read-Eval-Print Loop) for Java or C++. BeanShell doesn't count, nor does Ch. Ruby has one. And it has some nifty introspection abilities that make that REPL a handy tool.
It's expressio- oriented design makes programming far more efficient, especially when combined with blocks, as compared with the unnecessary tedium imposed by statement-oriented languages.
But if you have specific complaints, let's hear them. You must have something interesting to say if you're bothering to post on this topic. |
|
|
|
|
|
Insectoid
|
Posted: Mon Mar 09, 2009 11:52 am Post subject: RE:Ruby, why the hype? |
|
|
I'm getting into Ruby as well, and I love it so far. It is far easier to understand than Java, especially when you're just getting into OOP. Simple, convenient, consistent naming of methods makes it easy to convert between types or guess method names. Java's naming conventions are so inconsistent and long that it's impossible to guess. A lot of things in it are simpler than java. For example, printing to the screen in Java is System.out.println, far longer than Ruby's "puts". Ruby also simplifies output to a file. Java requires a File object to be made, a printstream to be opened, and then a print statement. It is my belief that you should just have to open the file and put; all printstreams and read streams should be automatically configured. With Java, I didn't learn anything about OOP, but with Ruby it clicked in a few days. |
|
|
|
|
|
Zeroth
|
Posted: Tue Mar 10, 2009 12:19 am Post subject: Re: Ruby, why the hype? |
|
|
Well, how about development time? I don't actually use Ruby. It looks pretty nice, but has too much of a Perl heritage for me to be comfortable with it. I like Python. A lot.
Consider this: going from C to Java is a 10x development speedup. Going from Java to Ruby/Python is another 10x-100x development speedup. Thats massive. Consider also, high-level data structures. I don't need to deal with messy generics(seriously, Java could have handled that way better), or a massive and inefficient STL. These data structures get massively optimized routines, heavily profiled and analyzed. I can't say the same for data structures that aren't integral parts of the language(ArrayList anyone?) like lists and dictionaries are to Python.
People like to be able to pick up Ruby or Python, and have a low mental overhead while developing. They can develop quickly, and thus find problems faster. In C++/Java, there is a large mental overhead needed, remembering data types, clumsy syntax, and dealing with clumsy higher-level data structure access. You may think Ruby has very vague syntax. Theres no goddamn way it could work if it did. XD |
|
|
|
|
|
btiffin
|
Posted: Tue Mar 10, 2009 10:34 am Post subject: Re: Ruby, why the hype? |
|
|
Zeroth; I'd question the 10x and 10x-100x numbers, and disagree. Highly dependent on problem faced and a huge variety of circumstances.
For instance, having grown up with C, I find Java slows me down. I spend too much time looking for the class and method most appropriate for the task at hand and not simply getting on with the task at hand. And the apps run slower. No order of magnitude faster development there for me. And there is NO WAY moving a development shop from C to Python or Ruby would be a two or three orders of magnitude increase in productivity. Not in any long term rabbit and hare race. As a for instance, a device driver is going to be nigh on impossible in Java, Python, Ruby compared to good old C.
Now ... using REBOL ... a MILLION fold increase in productivity and fun and profit and save the worldness.
A lot of the productivity equation is completely and utterly personal. I don't particularly like C++, I find it too complex for its own good. That puts me at a distinct disadvantage coding side by side by a fan of C++ that "gets it" and "likes it". That same fan (an actual real life experience here) will stick up his nose and scoff when faced with a Tcl/Tk prototype that took three days to write and covered over half of the frontend functionality of a huge system development that was on the verge of a 3 year and 30 million dollar FAIL.
Cheers,
Hoping Zeroth knows that I hold him at a high level of respect and simply playing the old guy role and pointing out the dangers of assumptions and flinging about of numbers. But really, REBOL, 1 MILLION times...
Oh, and on the thread topic ... Ruby is relatively famous and gets hype (deserved in my humble opinion) because of Ruby on Rails. That combination hit the streets right when that need needed to be filled. That need, MVC and website applications, is still well served by Ruby and Ruby on Rails. |
|
|
|
|
|
wtd
|
Posted: Tue Mar 10, 2009 11:26 am Post subject: RE:Ruby, why the hype? |
|
|
The only reason Ruby got hype was because Rails couldn't have been created in any other language. Think about that. Rails is nifty, but it exists because of the power of Ruby. |
|
|
|
|
|
btiffin
|
Posted: Tue Mar 10, 2009 11:51 am Post subject: RE:Ruby, why the hype? |
|
|
Ahh, wtd ... maybe you missed COBOL on Cogs.
http://www.coboloncogs.org/INDEX.HTM
Cheers
Excuse the thread dilution for a weak joke... |
|
|
|
|
|
wtd
|
Posted: Tue Mar 10, 2009 12:18 pm Post subject: RE:Ruby, why the hype? |
|
|
Note please I specifically didn't say Rails couldn't be implemented in any other language. People are hard at work at just that.
But the tools Ruby makes not only available but also easy to use inspired its creation, and that's where the real difference is. It's possible to do a lot of the things Ruby can do in other languages (though not all other languages) but in most of them, those ways never seem right. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
|
|