The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Smalltalk Daily 12/11/07: Immutability and Legacy Code

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 Daily 12/11/07: Immutability and Legacy Code Posted: Dec 11, 2007 6:55 AM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Smalltalk Daily 12/11/07: Immutability and Legacy Code
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

It used to be the case that this kind of code woud work fine in Cincom Smalltalk:

'foo bar' at: 5 put: $f

The problem is that the string 'foo bar' is a literal, and allowing it to be modified can introduce subtle - and hard to find - bugs into an application. Back in VW 7, we made literal objects in Smalltalk immutable. However, any change of this nature can cause problems for older code that relied on the former, mutable state of literals.

So, on today's Smalltalk Daily, I go over how to deal with this. As I bring up numerous times in the screencast, you shouldn't make literals mutable because you can; you should use the capabilities here mostly (or only, even) with legacy code situations.

Technorati Tags: ,

Read: Smalltalk Daily 12/11/07: Immutability and Legacy Code

Topic: Google Charts in Seaside Previous Topic   Next Topic Topic: Whatever.Object

Sponsored Links



Google
  Web Artima.com   

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