Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Article: Java Alternatives
Index -> Java
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Sun Sep 25, 2005 11:59 am   Post subject: Article: Java Alternatives

An article from IBM.
Sponsor
Sponsor
Sponsor
sponsor
MysticVegeta




PostPosted: Fri Dec 09, 2005 12:43 pm   Post subject: (No 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?
rizzix




PostPosted: Fri Dec 09, 2005 12:54 pm   Post subject: (No 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);
wtd




PostPosted: Fri Dec 09, 2005 2:46 pm   Post subject: (No 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}" }
rodmayroar




PostPosted: 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.
rdrake




PostPosted: 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.
Display posts from previous:   
   Index -> Java
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: