RSS Forums RSS
Please support our Ruby advertiser: SELL YOUR PRODUCT TODAY !

Is It Worth Learning Rugby?

Join Date: Jan 2006
Posts: 53
Reputation: Barnz is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Barnz Barnz is offline Offline
Junior Poster in Training

Re: Is It Worth Learning Rugby?

  #9  
Apr 3rd, 2007
I have been learning Ruby myself recently. And I think its fantastic, I originally started with PHP so I am kind of clung to that language for the simple reason of I have more experience with it.

My favourite things about Ruby is the syntax that it provides that you just cannot get in PHP like blocks / iterators for instance.

5.times {
//Code to execute 5 times goes here.
}

OR

You can even write your own blocks, just as an example you could write your own "statement like" methods.

def myIf(expr)
if expr
yield #executes the code in the block
end
end

myIf(true) {
puts "It worked"
}

Obviously the example above is crap, but you get the basic idea of what can be done. You can even pass variables etc to the block of code.

Plus Ruby is not just limited to web apps, I know PHP isnt, but I would say creating a desktop app in Ruby just comes as standard really. You can just include things like GTK as a library and make a desktop app. What I mean is.... I think Ruby was made as just a language, whereas I think PHP was centered around the web from day one. Ruby seems more like the web came after the language etc.

I think I will stick with PHP for my web stuff though, simply because I am more use to it. But when I have had time to learn Ruby properly who knows I may switch full time.
Last edited by Barnz : Apr 3rd, 2007 at 7:43 pm.
www.jab.poundingbeats.com - My PHP website.
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 12:59 pm.
Newsletter Archive - Sitemap - Privacy Statement - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC