🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.misc.discuss
Article #73012

Smalltalk printOn bug?

#73012
From: Ben Liblit
Date: Fri, 15 Nov 1991 00:14
24 lines
1619 bytes
ArrayedCollection's printOn method uses storeOn to print its contents.  This,
in my humble opinion, makes no sense whatsoever.  If the user wanted storage-
level detail, the user would have used storeOn.  Consider:  an array consisting
of two arrays, each of which holds three integers.  If you invoke this array's
printOn method (*not* storeOn), which would you rather see?

a) current situation:  ArrayedCollection's printOn uses storeOn

     Array (((Array basicNew: 3) at: 1 put: 1; at: 2 put: 2; at: 3 put: 3;
     yourself)((Array basicNew: 3) at: 1 put: 4; at: 2 put: 5; at: 3 put: 6;
     yourself))


b) better (?) situation:  ArrayedCollection's printOn uses printOn

     Array (Array (1 2 3) Array (4 5 6))

Is there a good reason why storeOn is used?  My Smalltalk version is 1.1.1, if
that is an important consideration.  (Is this the most current version?)

                            Ben Liblit
                            BRL102 @ psuvm.psu.edu -- BRL102 @ psuvm.bitnet
                            Liblit @ cs.psu.edu
                            "Fais que tes reves soient plus longs que la nuit."
Technical Details
Message-ID: <91318.191438BRL102@psuvm.psu.edu>
Path: arc1-ca.pugleaf.net!gmdzi!ieee.org!europa.asd.contel.com!gatech!psuvax1!psuvm!brl102

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1025b4,dded2e59e8eb4343,start
X-Google-Attributes: gid1025b4,public
X-Google-ArrivalTime: 1991-11-14 23:09:31 PST
Path: arc1-ca.pugleaf.net!gmdzi!ieee.org!europa.asd.contel.com!gatech!psuvax1!psuvm!brl102
From: BRL102@psuvm.psu.edu (Ben Liblit)
Newsgroups: gnu.misc.discuss
Subject: Smalltalk printOn bug?
Message-ID: <91318.191438BRL102@psuvm.psu.edu>
Date: 15 Nov 91 00:14:38 GMT
Organization: Penn State University
Lines: 24