Computer Science Canada

Article: Java Alternatives

Author:  wtd [ Sun Sep 25, 2005 11:59 am ]
Post subject:  Article: Java Alternatives

An article from IBM.

Author:  MysticVegeta [ Fri Dec 09, 2005 12:43 pm ]
Post subject: 

*I know this is a long thread but since it was on the first page, I decided to reply*

I love the closure parts of the article between the comparison of Ruby and Java

code:
array.each {|element| puts element}


'Tis absolutely brilliant! Are there lots of examples where Ruby beats Java in shortcuts?

Author:  rizzix [ Fri Dec 09, 2005 12:54 pm ]
Post subject: 

Yes there are... Although just to be fair to Java.. here's it's quickie:

Java:
for (Object o : array) System.out.println(o);

Author:  wtd [ Fri Dec 09, 2005 2:46 pm ]
Post subject: 

MysticVegeta wrote:
*I know this is a long thread but since it was on the first page, I decided to reply*

I love the closure parts of the article between the comparison of Ruby and Java

code:
array.each {|element| puts element}


'Tis absolutely brilliant! Are there lots of examples where Ruby beats Java in shortcuts?


There are lots of fantastic uses of blocks in Ruby. For instance, let's say you want to number the elements in an array as you print them.

Ruby:
array.each_with_index { |element, index| puts "#{index + 1}. #{element}" }

Author:  rodmayroar [ Wed Mar 11, 2015 7:09 am ]
Post subject:  RE:Article: Java Alternatives

The knowledge that you have to post to this Web site. Like a river that flows along a saw, no holidays. We like to get to know them by sawing it. The knowledge you provide is endless.

Author:  rdrake [ Wed Mar 11, 2015 7:43 am ]
Post subject:  Re: RE:Article: Java Alternatives

rodmayroar @ Wed Mar 11, 2015 7:09 am wrote:
The knowledge that you have to post to this Web site. Like a river that flows along a saw, no holidays. We like to get to know them by sawing it. The knowledge you provide is endless.
If there were ever a valid reason for necroposting, this would be it.


: