Laran Evans
I develop software people love to use.
  • Home
  • About
  • Contact
  • Resume
  • Testimonials
Skip to content
  • Entrepreneurship
    • Leadership
    • Project Management
    • Team Development
    • Time Management
  • Puzzles
  • Software Architecture
    • Cloud Computing
  • Software Development
    • Algorithms
    • CSS
    • Java
    • Javascript
    • MySQL
    • PHP
    • Python
    • Ruby and Rails
    • System Administration
« Basic Bit Operations in Java
Kuali in Nacubo Magazine »

Ruby Blocks, Procs, Lambda

By laran | Published: 2010/02/18

A friend of mine asked me to describe the differences among blocks, procs and lambdas in Ruby. I had to admit that I didn’t really know!

One of the niceties of Ruby is the expressiveness of the language. It can be shaped and molded, stretched and teased in all sorts of ways that other languages just can’t. I attribute most of this to the presence of closures.

Given the amount of time I spend working in other languages, I guess I have gotten used to doing what can be done with closures in other, less elegant ways.

After being stumped by such a fundamental question I did a little digging and found a wonderful explanation of the differences among blocks, procs and lambdas by Robert Sosinksi. This guy really knows his Ruby.

Now I have a good grasp over the various types of closures in Ruby and look forward to putting them to good use.

Thanks for taking the time to write that up Robert!

This entry was posted in Ruby and Rails and tagged closures, ruby. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.
« Basic Bit Operations in Java
Kuali in Nacubo Magazine »

Post a Comment

Click here to cancel reply.

Your email is never published nor shared. Required fields are marked *

*
*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

  • About Me

    I've got a masters degree in computer science and over 10 years of experience building web-based systems using Java/J2EE, Ruby, Rails and PHP. I'm a strong believer in the effectiveness of Agile Methods. Read more »

  • Subscribe

  • Similar Posts
    • Speed up Rails apps with RPM
    • Outsourcing Killed By Django And Ruby On Rails | Django Aware
    • Rails ActionMailer the right way
    • Installing Phusion Passenger for Apache: Step 1.5
    • Resolve MySQL Issues in Rails on Windows
Hello world
  • From Around the Web

    • Chopper Girl @ The 2010 Brass Balls Long Road Party (Uploads from BRASS BALLS BOBBERS)
    • Web App Business Models: User Needs and What People Pay For (Box UK Blog)
    • Blog Writing Tips from the World’s Most Famous Authors (Blogsessive.com)
    • How to get exponential success on your blog (CatsWhoBlog.com)
    • The Four Stages of Growing a Blog (Daily Blog Tips)
    Shared Items
  • Recent Posts

    • 80 pages of Ruby on Rails Performance Optimization Tips
    • Ruby Garbage Collection In-Depth
    • Binary Logic Basics
    • Kuali in Nacubo Magazine
    • Ruby Blocks, Procs, Lambda
  • Older Posts By Month

    Let's Talk

    Ask a question below. You'll be prompted for your name and email after you click the "Ask" button.

Know more. Accomplish more. Succeed.