The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Smalltalk and C-style language difference

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
Smalltalk and C-style language difference Posted: Jan 30, 2004 1:57 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Smalltalk and C-style language difference
Feed Title: Michael Lucas-Smith
Feed URL: http://www.michaellucassmith.com/site.atom
Feed Description: Smalltalk and my misinterpretations of life
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Michael Lucas-Smith

Advertisement

A lot of people take one look at the Smalltalk syntax and turn away for good. This is not understandable given that most languages change the C-style syntax slightly any way.. regex is completely different.. stack based languages are completely different again.. functional languages are different. Open your minds people.

I have one particular example that I'd like to share with you though. Here it is:

canvas displayLineFrom: (topPoint x - gibDistance @ topPoint y) to: (topPoint + 1).

This in C-style is:

canvas.displayLineFrom_to( Point.asPoint(topPoint.x() - gibDistance, topPoint.y()), topPoint.MoveBy(1,1));

I'd just like to say that both are nasty to read.. but, these days I find the Smalltalk syntax much more concise when it comes to these sorts of co-ordinate type calculations.

Read: Smalltalk and C-style language difference

Topic: Dreading the supermarket Previous Topic   Next Topic Topic: The grass is greener.

Sponsored Links



Google
  Web Artima.com   

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