The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Crawling towards Past Achievements

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
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Crawling towards Past Achievements Posted: May 11, 2006 12:07 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Crawling towards Past Achievements
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

Don Box points to the new support for lambda expressions in C#:


Expression<Func<int, int>> expr = a => a + 3; 
Console.WriteLine(expr); // prints "a => Add(a, 3)" 
Func<int, int> 
func = expr.Compile(); // LCG's an MSIL method from the expr Console.WriteLine(func(4)); // prints "7" 

Yes, it's nice that Microsoft has added this to C# - it gets them up to Lisp and Smalltalk levels of technology, only a few decades late :)

Personally, I find the following easier to look at:


expression := [:input | input + 3].
Transcript show: expression method getSource; cr.
Transcript show: (expression value: 4) printString; cr.

You don't have the separate compile step, because of the way Smalltalk works. What's also neat is this:

Block in the Inspector

That's the block expression being inspected, with the bytecode highlighted. In Smalltalk, it's turtles all the way down.

Read: Crawling towards Past Achievements

Topic: Why I should be taller Previous Topic   Next Topic Topic: Give Dave Buck some points

Sponsored Links



Google
  Web Artima.com   

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