The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Matz is on the Plane, Weighing Dots and Arrows

0 replies on 1 page.

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 threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Red Handed

Posts: 1158
Nickname: redhanded
Registered: Dec, 2004

Red Handed is a Ruby-focused group blog.
Matz is on the Plane, Weighing Dots and Arrows Posted: Oct 12, 2005 2:18 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Red Handed.
Original Post: Matz is on the Plane, Weighing Dots and Arrows
Feed Title: RedHanded
Feed URL: http://redhanded.hobix.com/index.xml
Feed Description: sneaking Ruby through the system
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Red Handed
Latest Posts From RedHanded

Advertisement

Dots or arrows? Dots or arrows? See, he said he was leaving for RubyConf and on the way he’d figure out this whole dots and arrows business. Currently, arrows are winning, since they’re checked into 1.9.

Nobu gives some examples in ruby-talk:160170:

 >> 1.times -> (foo="bar") { puts foo }
 => 0

 >> def y
 >>   yield
 >> end
 >> y -> (foo="bar") { puts foo }

The two dotted suggestions (err.. one one-dotted and one two-dotted!) come from Christophe Grandsire, who suggests a colon, and Eric Mahurin, who offers a period (which semantically jives with method calling):

 collection.each:(foo="bar){puts foo} 
 collection.each.(foo="bar){puts foo} 

I don’t envy the Yacc’ry ahead for Nobu and Matz. But it’s fun to see everyone’s ears go up when the syntactical frosting comes out. Even when it’s only a couple sprinkles.

Read: Matz is on the Plane, Weighing Dots and Arrows

Topic: EuRuKo 2005 Previous Topic   Next Topic Topic: looking forward to RubyConf... desperately

Sponsored Links



Google
  Web Artima.com   

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