[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ten Things Every Java Programmer Should Know About Ruby

Jim Weirich

1/27/2005 5:56:00 PM

We will be introducing Ruby to our XP Users group in Cincinnati next week.
I thought it would be fun to create a list of "Ten Things Every Java
Programmer Should Know About Ruby" to help the transition. I've got a
number of things in my head, but would love to hear ideas from the mailing
list.

So go ahead and submit your ideas. What things should a Java programmer
be aware of when starting out in Ruby?

--
-- Jim Weirich jim@weirichhouse.org http://onest...
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)



103 Answers

Nathaniel Talbott

1/27/2005 6:29:00 PM

0

On Jan 27, 2005, at 12:55, Jim Weirich wrote:

> What things should a Java programmer
> be aware of when starting out in Ruby?

Well, it would obviously need to be adapted, but I loved this article:

http://dirtsimple.org/2004/12/python-is-not...


Nathaniel
Terralien, Inc.

<:((><



martinus

1/27/2005 6:32:00 PM

0

Classes really are objects. this is the reason why e.g String.new makes
much more sense then Java's new String();

martinus

Joao Pedrosa

1/27/2005 6:35:00 PM

0

Hi,

On Fri, 28 Jan 2005 02:55:46 +0900, Jim Weirich <jim@weirichhouse.org> wrote:
> We will be introducing Ruby to our XP Users group in Cincinnati next week.
> I thought it would be fun to create a list of "Ten Things Every Java
> Programmer Should Know About Ruby" to help the transition. I've got a
> number of things in my head, but would love to hear ideas from the mailing
> list.
>
> So go ahead and submit your ideas. What things should a Java programmer
> be aware of when starting out in Ruby?

1- Ruby does not have type casting.
2- Try to not think about interfaces, but enjoy fully the dynamic typing.
3- No overload of methods.
4- Enjoy closures/blocks.
5- Don't worry about performance until the program/library has been made.
6- Web-development is possible with other languages besides Java.
Enjoy FastCGI and mod_ruby. Give Rails a shot.
7- Ruby has O/R mappers, so find your Ruby "hibernate", but drop any
preconceptions.
8- Ruby has MVC and OO programming and libraries, but drop any preconceptions.
9- Ruby is a language to be used everywhere. You use it even in
templates. No need for "Velocity/JSP."
10- Ruby is not a Silver Bullet, unlike Java, right? :-)

Cheers,
Joao


Belorion

1/27/2005 6:36:00 PM

0

1) Ruby rocks.

Seriously though... It's been a while since I've done any Java coding,
but, the first points that came to my mind are:

-In Ruby data is strongly typed, but variables are *not* (no messy
typecasting, yay!)
-No method overloading (probably as a result of the above, but that is
just speculation)
-*BUT* you can have variable number of parameters, and multiple return values

of course, the list of differences goes on and on, but those were the
first 3 that came to my mind.

On Fri, 28 Jan 2005 02:55:46 +0900, Jim Weirich <jim@weirichhouse.org> wrote:
> We will be introducing Ruby to our XP Users group in Cincinnati next week.
> I thought it would be fun to create a list of "Ten Things Every Java
> Programmer Should Know About Ruby" to help the transition. I've got a
> number of things in my head, but would love to hear ideas from the mailing
> list.
>
> So go ahead and submit your ideas. What things should a Java programmer
> be aware of when starting out in Ruby?
>
> --
> -- Jim Weirich jim@weirichhouse.org http://onest...
> -----------------------------------------------------------------
> "Beware of bugs in the above code; I have only proved it correct,
> not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)
>
>


Mike Clark

1/27/2005 6:40:00 PM

0


On Jan 27, 2005, at 10:55 AM, Jim Weirich wrote:

> We will be introducing Ruby to our XP Users group in Cincinnati next
> week.
> I thought it would be fun to create a list of "Ten Things Every Java
> Programmer Should Know About Ruby" to help the transition. I've got a
> number of things in my head, but would love to hear ideas from the
> mailing
> list.
>
> So go ahead and submit your ideas. What things should a Java
> programmer
> be aware of when starting out in Ruby?

1. Once you start coding Ruby, going back to Java is painful.

Mike



why the lucky stiff

1/27/2005 6:43:00 PM

0

Jim Weirich wrote:

>So go ahead and submit your ideas. What things should a Java programmer
>be aware of when starting out in Ruby?
>
Schwern's paper is written for Perl, but it rings of many Rubyisms.
<http://magnonel.guild.net/~schwern/papers/Why_I_Am_Not_A_Java_Programmer/wh...

_why


Edgardo Hames

1/27/2005 6:57:00 PM

0

On Fri, 28 Jan 2005 02:55:46 +0900, Jim Weirich <jim@weirichhouse.org> wrote:
> We will be introducing Ruby to our XP Users group in Cincinnati next week.
> I thought it would be fun to create a list of "Ten Things Every Java
> Programmer Should Know About Ruby" to help the transition. I've got a
> number of things in my head, but would love to hear ideas from the mailing
> list.
>
> So go ahead and submit your ideas. What things should a Java programmer
> be aware of when starting out in Ruby?
>

I would suggest that once you come up with the top ten list, it would
be really nice if you did post it to the mailing list. I'd like to
forward it to some friends.

Kind Regards,
Ed
--
Alcohol is the anesthesia by which we endure the operation of life.
-- George Bernard Shaw


Petite Abeille

1/27/2005 7:08:00 PM

0


On Jan 27, 2005, at 18:55, Jim Weirich wrote:

> What things should a Java programmer
> be aware of when starting out in Ruby?

That you can write Ruby in Java:

http://jruby.source...

Cheers

--
PA, onnay equitursay
http://alt.text...



Jim Weirich

1/27/2005 7:37:00 PM

0


Edgardo Hames said:
> I would suggest that once you come up with the top ten list, it would
> be really nice if you did post it to the mailing list. I'd like to
> forward it to some friends.

I'm going to collect responses in a public Ta-Da list at
http://jimweirich.tadalist.com/lists/pu... (which is already way
over 10 items!). Later (possibly this weekend) I'll sort through the
collected suggestions, edit them down to my top ten and publish the
result.

--
-- Jim Weirich jim@weirichhouse.org http://onest...
-----------------------------------------------------------------
"Beware of bugs in the above code; I have only proved it correct,
not tried it." -- Donald Knuth (in a memo to Peter van Emde Boas)



Mathieu Bouchard

1/27/2005 7:43:00 PM

0