The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Smalltalk out of the box

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 out of the box Posted: Jul 25, 2005 5:00 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Smalltalk out of the box
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

Rob Lally gave Smalltalk (Dolphin) a whirl, and came away with a few things I'd like to comment on - mostly because I think these are the sorts of problems a lot of people looking at Smalltalk for the first time have. Not on knock on them - or on Dolphin, for that matter - we (the Smalltalk community at large) need to do a better job of education. I tried commenting on Rob's site, but my comment inexplicably bounced. So.... in recreating a Ruby script, Rob decided to create a workspace script:

Firstly - workspaces in Dolphin are built around a piss poor text control. They have only a single level of undo, no way to show line numbers that I can see, syntax highlighting that only works properly after you've evaluated the text, no regular expression search and replace support, no text completion - even of words already in the same file. I haven't worked in a text editing environment that bad in years. Possibly ever in fact. Apparently the quality of the underlying text control used is a general source of unhappiness and has been replaced by the scinitlla control in the next version out in the next month or so.

Well, text controls have never really been something Smalltalkers have focused on. It's because we tend not to write large masses of text - we create a class, create a method, and save that. The methods we save tend to be short - typically 10 lines or less. In 10 lines, there's just not that much editing power needed - which explains why the community has never really focused on the problem. I'm not really trying to excuse this lack so much as explain it - people tend not to solve problems they don't encounter :)

Next, Rob had a few things to say about Dolphin's file and DB libraries. Not having used them, I can't really comment one way or the other, so I'll skip forward to something that jumped at me:

One thing that bothered me was that there were chunks of code that I wanted to turn into functions/methods. In Ruby I'd simply declare a free standing function. Here this was not an option - I had to duplicate the code.

Smalltalk has what Rob wants - it's called a block. Heck, I've even blogged on the kind of usage he's talking about. I ship a script runner with BottomFeeder, which was written by Bob W. In the scripts I've written, I'll often need the kind of function Rob's after here - what we call a block in Smalltalk. Here's an example from one of my scripts:

contentBlock := [:builder :chunk :stringToLookFor |
	| lnk |
	lnk := 'http://www.dilbert.com', chunk trimSeparators.
	builder link:  lnk.
	builder guid: lnk.
	builder title: stringToLookFor, Core.Date today printString.
	builder description: '<img src="', lnk, '">'.
	builder pubDate: Core.Timestamp now].

There's a reusable function, in Smalltalk form. Actually, so far as I know, the Ruby closure support is modelled on Smalltalk's feature. In any case, I just figured I'd add my two cents to clear things up.

Read: Smalltalk out of the box

Topic: How to irritate Previous Topic   Next Topic Topic: Live Advertising

Sponsored Links



Google
  Web Artima.com   

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