Mantis Bugtracker

Viewing Issue Advanced Details Jump to Notes ] View Simple ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0001691 [Squeak Packages] VBRegex minor always 08-16-05 18:58 08-16-05 19:01
Reporter KenCausey View Status public  
Assigned To
Priority normal Resolution open Platform
Status new   OS
Projection none   OS Version
ETA none Product Build
Summary 0001691: [FIX] nil and #nil and a fix for RxParser
Description "Andrew P. Black" <>:

"Did the meaning of

    array := #(12 nil foo)

change at some point? array last is of course #foo. array first is
1. array third is now nil. Was array third #nil at some point in the

I'm asking because RxParser class >>
test:with:expect:withSubexpressions: is driven off a table of array
literals. It has a test "subxpr ~= #nil" that now has to be modified
to read "subxpr ~= nil" to get the tests to run.

I'm sure that Vassilli would have had this right at some time in the
past, maybe in "Some Other Smalltalk". Is this an incompatibility
with VisualWorks?"
Steps To Reproduce
Additional Information
Attached Files  RxParserTestFix.1.cs.gz [^] (524 bytes) 08-16-05 18:58

- Relationships

- Notes
(0002370 - 882 - 1006 - 1048 - 1048 - 1048 - 1048)
08-16-05 18:59

Avi Bryant <>:

"I could be misremembering, but I think what happened is this:

1. In VisualWorks, (#(12 nil foo) at: 2) == nil.
2. That's the way the tests were written for Vassili's version.
3. In Squeak, (#(12 nil foo) at: 2) == #nil.
4. When I ported the RxParser to Squeak, I changed those tests to make
them pass.
5. Having had to do this for several packages ported back and forth, I
posted to the list about the issue and included a changeset that
modified Squeak's behavior.
6. Surprisingly (and without proper review, unfortunately, see recent
comments from Andreas), this change got included into the base.
7. The regex package hasn't been updated since.

As was mentioned in the discussion at the time, ANSI dictates the
current behavior (nil, not #nil), and I'm pretty sure Squeak was the
only Smalltalk that did it the other way."
(0002371 - 587 - 760 - 804 - 804 - 804 - 804)
08-16-05 19:01

"Boris Gaertner" <>:

"> Did the meaning of
> array := #(12 nil foo)
> change at some point?
Yes, it did.

In all the old Smalltalks (early Smalltalk-80, Digitalk Smalltalk/V)
we had:

# (12 nil true false) collect: [:item | item class]
#(SmallInteger Symbol Symbol Symbol)

ANSI requires:

# (12 nil true false) collect: [:item | item class]
#(SmallInteger UndefinedObject True False)

The change to ANSI came with change set 5736 (by Avi Bryant)
Squeak 3.6 final has still the old interpretation, Squeak 3.7 final
has the new one."

- Issue History
Date Modified Username Field Change
08-16-05 18:58 KenCausey New Issue
08-16-05 18:58 KenCausey File Added: RxParserTestFix.1.cs.gz
08-16-05 18:59 KenCausey Note Added: 0002370
08-16-05 19:01 KenCausey Note Added: 0002371

Mantis 1.0.8[^]
Copyright © 2000 - 2007 Mantis Group
37 total queries executed.
28 unique queries executed.
Powered by Mantis Bugtracker