The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Everything old is new again

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
Everything old is new again Posted: Jul 23, 2004 1:48 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Everything old is new again
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

The MS guys are rediscovering yet another old Smalltalk idea - treating an object as if it were an array. Take a look at #instVarAt: and #instVarAtPut: in class Object (never mind that doing this sort of thing is typically a very, very bad idea):

http://www.csharphelp.com/archives/archive140.html

C# introduces a new concept known as Indexers which are used for treating an object as an array. The indexers are usually known as smart arrays in C# community. Defining a C# indexer is much like defining properties. We can say that an indexer is a member that enables an object to be indexed in the same way as an array.


%A0  this [argument list]
 {
%A0 get
%A0 {
%A0%A0 // Get codes goes here
%A0 }
%A0 set
%A0 {
%A0%A0 // Set codes goes here
%A0 }
 }

Of course, the beauty of this is that C# had to add new syntax to do this, while the equivalent Smalltalk functionality is just another set of methods. So the C# guy has to memorize yet another set of reserved words, while the Smalltalker simply looks at the library. Sometimes I'm amazed at how Java and C# are examples of Smalltalk being re-invented - but with a crufty, inelegant syntax....

Read: Everything old is new again

Topic: Now the UN is spamming??? Previous Topic   Next Topic Topic: OOSig Meeting

Sponsored Links



Google
  Web Artima.com   

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