Stefan Schmiedl wrote:
While looking around in Iliad source code, I noticed that
Object>>asResponse is implemented using Object>>printString.

Dolphin Smalltalk makes a -- quite useful -- distinction
between

  printString   - what the developer wants to see
  displayString - what the user gets to see

GNU Smalltalk also has the same distinction, as you surely know:

 'abc' printString = '''abc'''   (prints as 'abc')
 'abc' displayString = 'abc'     (prints as abc without quotes)

Also, I'm seeing that Iliad.Response supports the "usual"
streaming methods #nextPut: and #nextPutAll. What about

Object extend [
    asResponse [
        | response |
        <category: 'converting'>
        response := Iliad.Response ok.
        self respondOn: response.
        ^response
    ]
    respondOn: aResponse [
        <category: 'responding'>
        self displayOn: aResponse.
    ]
]

Yes, looks nice.

Paolo


_______________________________________________
help-smalltalk mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-smalltalk

Reply via email to