[squeak-dev] The Trunk: Collections-mt.987.mcz

Thiede, Christoph Christoph.Thiede at student.hpi.uni-potsdam.de
Thu Feb 24 21:47:30 UTC 2022


Hi Marcel,


when do we use "flag: #deprecate" and when "flag: #deprecated"? I thought that we would only use the latter to indicate that we did not yet risk inserting an actual "self deprecated" in the same place. :-)


Best,

Christoph

________________________________
Von: Squeak-dev <squeak-dev-bounces at lists.squeakfoundation.org> im Auftrag von Taeumel, Marcel
Gesendet: Mittwoch, 9. Februar 2022 19:50:03
An: squeak-dev
Betreff: Re: [squeak-dev] The Trunk: Collections-mt.987.mcz

@Levente: Would you verify that this implementation in LimitedWriteStream is okay? Thanks. :-)

Best,
Marcel

Am 09.02.2022 19:40:28 schrieb commits at source.squeak.org <commits at source.squeak.org>:

Marcel Taeumel uploaded a new version of Collections to project The Trunk:
http://source.squeak.org/trunk/Collections-mt.987.mcz

==================== Summary ====================

Name: Collections-mt.987
Author: mt
Time: 9 February 2022, 7:40:16.073774 pm
UUID: 0e417f39-a88b-8045-bb6c-32a1024cfb27
Ancestors: Collections-mt.986

Fixes regression in #printStringLimitedTo:. Minor code cleanup.

=============== Diff against Collections-mt.986 ===============

Item was changed:
----- Method: Collection>>printOn:delimiter: (in category 'printing - obsolete') -----
printOn: aStream delimiter: delimString

+ self flag: #deprecated.
- self flag: #deprecate.
self
printElementsOn: aStream
separatedBy: delimString.!

Item was changed:
----- Method: Collection>>printOn:delimiter:last: (in category 'printing - obsolete') -----
printOn: aStream delimiter: delimString last: lastDelimString
"Print elements on a stream separated
with a delimiter between all the elements and with
a special one before the last like: 'a, b and c'

Note: Feel free to improve the code to detect the last element."

| n sz |
+ self flag: #deprecated.
- self flag: #deprecate.
n := 1.
sz := self size.
self do: [:elem |
n := n + 1.
aStream print: elem]
separatedBy: [
n = sz
ifTrue: [aStream print: lastDelimString]
ifFalse: [aStream print: delimString]]!

Item was added:
+ ----- Method: LimitedWriteStream>>next:putAll:startingAt: (in category 'writing') -----
+ next: anInteger putAll: aCollection startingAt: startIndex
+ "Store the next anInteger elements from the given collection."
+
+ | newEnd |
+ anInteger > 0 ifFalse: [ ^aCollection ].
+
+ newEnd := position + anInteger.
+ newEnd > limit ifTrue: [
+ super next: (limit - position max: 0) putAll: aCollection startingAt: startIndex.
+ limitBlock value.
+ ^ aCollection].
+
+ ^ super next: anInteger putAll: aCollection startingAt: startIndex!

Item was removed:
- ----- Method: String>>asExplorerString (in category 'user interface') -----
- asExplorerString
-
- ^ self printString!

Item was removed:
- ----- Method: Symbol>>asExplorerString (in category 'user interface') -----
- asExplorerString
- ^ self printString!


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20220224/ac25272c/attachment.html>


More information about the Squeak-dev mailing list