svenvc / ston

STON - Smalltalk Object Notation - A lightweight text-based, human-readable data interchange format for class-based object-oriented languages like Smalltalk.
MIT License
135 stars 32 forks source link

Improve method comments #38

Closed Ducasse closed 1 year ago

Ducasse commented 2 years ago

Hi sven

after losing some moment trying to output a dictionary, I felt that improving the comments of put:* would be good.

STON class >> put: aDictionary onStream: stream
    "Put aDictinoary into the argument, stream.
    Here is a typical scenario

    | wrt |
    wrt := (FileSystem workingDirectory / 'pillar.xxx') writeStream.
    STON 
        put: (Dictionary new at: #a put: 33; yourself)
        onStream: wrt.
    wrt close

    Notice the close of the stream that will flush the output in the file.
    "
    (self writer on: stream) nextPut: aDictionary

I can do a PR if needed. S.

svenvc commented 2 years ago

Although the class comment of the STON class is pretty extensive, the methods on the class side have indeed no comments.

I will do a pass over them and add some examples as well.

But not now, as I am on holiday.

Ducasse commented 2 years ago

Good holidays. They are important :) I should take some more.

svenvc commented 2 years ago

Hi Stef,

I just committed the following: https://github.com/svenvc/ston/commit/81b28d9cc1e2056cd4ea9b7332377e54c08e161c

Sven