3 ms·
dev work didn't stopped 4 years ago, it's just not main priority anymore, and I'm blocked on two major things. (see below) console "foo" print would be th
by rurban 7y ago
dev work didn't stopped 4 years ago, it's just not main priority anymore, and I'm blocked on two major things. (see below)
console "foo" print
would be the potion syntax, if console would exist as IO object. just compare to smalltalk, forth or ruby with smalltalk syntax.
print is not used as serialization method, and not used as pprint.
pprint would be the proper pretty-printing extension over print,
and dump is the default serializer.
I don't get the problem with "hello" print. It's not comparable to someObj.ToString().
The potion equivalent would rather be hello string vs hello dump vs hello pprint.
- thelazydogsback 7y ago> console "foo" print Sorry if I misunderstand -- Wouldn't this send "foo" to the console object (which it probably wouldn't understand), and then send "print" to whatever that returned, which isn't what you want? You don't want to send "print" to "foo" first and then send that to the console either. You want to send the message [print "foo"] to the console object - you are delegating the action. [Using ST syntax] If you wanted to do it w/o a reified message, you could do: console print "foo" Where "print" is really "get-default-printer-object" which uses something like doesNotUnderstand to respond to "foo" as a message, or console print: "foo" As a keyword send, or to combine the approaches somewhat: (console stdio-printer) print: "foo". I will RTFM again so I can get a better handle on the Potion syntax - unlike ST which I'm more used to, it's not as clear to me yet at first glance what is a msg and what is an arg.