The Artima Developer Community
Sponsored Link

PHP Buzz Forum
RubySource: Getting to Grips with Blocks

0 replies.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a flat view of this topic  Flat View
Previous Topic   Next Topic
Threaded View: This topic has 0 replies on 1 page
Harry Fuecks

Posts: 875
Nickname: hfuecks
Registered: Sep, 2004

Dynamically typed through Sitepoint
RubySource: Getting to Grips with Blocks Posted: Sep 9, 2011 12:14 PM
Reply to this message Reply

This post originated from an RSS feed registered with PHP Buzz by Harry Fuecks.
Original Post: RubySource: Getting to Grips with Blocks
Feed Title: SitePoint's PHP Blog: Dynamically Typed
Feed URL: http://feeds.pheedo.com/sitepoint_blogs_category_php_feed
Feed Description: SitePoint's PHP blog: Dynamically Typed
Latest PHP Buzz Posts
Latest PHP Buzz Posts by Harry Fuecks
Latest Posts From SitePoint's PHP Blog: Dynamically Typed

When making the switch to Ruby from a PHP background, one of the grayest areas for me was blocks. Blocks are everywhere in Ruby and not having a good understanding of them will stall your learning past the “novice” stage. When you first start out with Ruby you will inevitably use blocks exclusively for iteration. Hello Blocks 3.times {|n| puts "Printed #{n} times" } The code above must be the “hello world” of blocks, and from that single line we get alot of what Ruby is all about

Read: RubySource: Getting to Grips with Blocks


Topic: PHPMaster: Migrate from the MySQL Extension to PDO Previous Topic   Next Topic Topic: Watch-out PHP 5.3.7+ is about.. and the is_a() / __autoload() mess.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use