Introducing the “Welcome to Xojo” Bundle!

New to Xojo and looking for guidance? We've put together a terrific bundle to welcome you! Xojo Bundle

This bundle includes six back issues of the magazine -- all of year 21 in printed book and digital formats -- plus a one-year subscription (beginning with 22.1) so you'll be learning all about Xojo for the next year. It's the perfect way to get started programming with Xojo. And you save as much as $35 over the non-bundle price!

This offer is only available for a limited time as supplies are limited, so hurry today and order this special bundle before the offer goes away!

Article Preview

Buy Now

Issue 7.1


Side-Effect Free Functions

Write Code as Little Transactions

Issue: 7.1 (November/December 2008)
Author: Charles Yeomans
Author Bio: Charles is a senior software engineer at Dakim, Inc.
Article Description: No description available.
Article Length (in bytes): 6,158
Starting Page Number: 54
Article Number: 7121
Related Link(s): None

Excerpt of article text...

In programming, a method is said to have a side effect when it changes the state of the program. Programs without side effects are much easier to debug. They are also much less interesting. So the trick is to isolate code that changes state. For example...

An object holds a list of weak references to other objects. From time to time, you want to cull dead references from the list. Here is a standard procedural implementation.

Sub RemoveDeadRefs()

...End of Excerpt. Please purchase the magazine to read the full article.