Re: [Pharo-dev] [Glass] printString and asString

2014-01-07 Thread Esteban A. Maringolo
I don't want to add more fire to this... but I would even add a #basicPrintOn: and a #basicDisplayOn: in Object. The default #printOn: and #displayOn: would be based on these basic implementations. :) Esteban A. Maringolo 2014/1/6 Tudor Girba tu...@tudorgirba.com: +1 On Mon, Jan 6, 2014 at

Re: [Pharo-dev] [Glass] printString and asString

2014-01-07 Thread Carlo
+1 for #basicPrintOn: (sub classes might want to re-use base implementation) -1 for #basicDisplayOn: (not necessary and by definition no base implementation could satisfy all clients) On 08 Jan 2014, at 1:05 AM, Esteban A. Maringolo emaring...@gmail.com wrote: I don't want to add more fire to

Re: [Pharo-dev] [Glass] printString and asString

2014-01-06 Thread Sebastian Sastre
On Jan 6, 2014, at 10:32 AM, Esteban A. Maringolo emaring...@gmail.com wrote: DomainObject from which most of our classes inherit, so this is probably the place to add a 'displayString' for something like this. Not necessarily domain objects only. Some core objects (Blocks,

Re: [Pharo-dev] [Glass] printString and asString

2014-01-06 Thread Otto Behrens
I need for example a string representation of objects generally to display in anchors in our seaside application. We have a class DomainObject from which most of our classes inherit, so this is probably the place to add a 'displayString' for something like this. Not necessarily domain

Re: [Pharo-dev] [Glass] printString and asString

2014-01-06 Thread Esteban A. Maringolo
2014/1/6 Otto Behrens o...@finworks.biz: I need for example a string representation of objects generally to display in anchors in our seaside application. We have a class DomainObject from which most of our classes inherit, so this is probably the place to add a 'displayString' for something

Re: [Pharo-dev] [Glass] printString and asString

2014-01-06 Thread Otto Behrens
I don't really understand why. How would you distinguish between which (kinds of) core objects and which not? Will you not end up with a displayString on Object again? You will not know all the 'why's in advance. The concrete answer is in the next developer's creativity. What you can do

Re: [Pharo-dev] [Glass] printString and asString

2014-01-06 Thread Sebastian Sastre
On Jan 6, 2014, at 12:00 PM, Otto Behrens o...@finworks.biz wrote: I don't really understand why. How would you distinguish between which (kinds of) core objects and which not? Will you not end up with a displayString on Object again? You will not know all the 'why's in advance. The

Re: [Pharo-dev] [Glass] printString and asString

2014-01-06 Thread Stéphane Ducasse
+ 1 I need for example a string representation of objects generally to display in anchors in our seaside application. We have a class DomainObject from which most of our classes inherit, so this is probably the place to add a 'displayString' for something like this. Not necessarily domain

Re: [Pharo-dev] [Glass] printString and asString

2014-01-06 Thread Tudor Girba
+1 On Mon, Jan 6, 2014 at 4:19 PM, Stéphane Ducasse stephane.duca...@inria.frwrote: + 1 I need for example a string representation of objects generally to display in anchors in our seaside application. We have a class DomainObject from which most of our classes inherit, so this is

Re: [Pharo-dev] [Glass] printString and asString

2014-01-05 Thread Otto Behrens
Thank you everyone for your comments. I agree with Martin's comments and Stef's most recent one. Some of the messages may not have reached the other lists as this was actually posted to glass and pharo. Is this the right conclusion of what we're going to do now? - On Pharo and GemStone, we will

Re: [Pharo-dev] [Glass] printString and asString

2014-01-04 Thread Yuriy Tymchuk
On 03 Jan 2014, at 21:55, Martin McClure mar...@hand2mouse.com wrote: On 01/03/2014 12:33 AM, Otto Behrens wrote: Hi, I've run into one of my favorite problems in Smalltalk and decided to try the list. Please don't shoot me on this one; perhaps you've run into it yourself. If there are

Re: [Pharo-dev] [Glass] printString and asString

2014-01-04 Thread Stéphane Ducasse
And number, no? For me as* methods are for conversion between types. E.i. if you have string and want it as Integer you use asInteger. no the point is exactly that :) conversion between polymorphic objects asFloat asInteger asFraction asString

Re: [Pharo-dev] [Glass] printString and asString

2014-01-03 Thread Martin McClure
On 01/03/2014 12:33 AM, Otto Behrens wrote: Hi, I've run into one of my favorite problems in Smalltalk and decided to try the list. Please don't shoot me on this one; perhaps you've run into it yourself. If there are discussions that I should read, please send me some info. Hi Otto, Well,

Re: [Pharo-dev] [Glass] printString and asString

2014-01-03 Thread Tudor Girba
Thanks, Martin. I second your summary. Doru On Fri, Jan 3, 2014 at 8:55 PM, Martin McClure mar...@hand2mouse.comwrote: On 01/03/2014 12:33 AM, Otto Behrens wrote: Hi, I've run into one of my favorite problems in Smalltalk and decided to try the list. Please don't shoot me on this

Re: [Pharo-dev] [Glass] printString and asString

2014-01-03 Thread Stéphane Ducasse
I agree and especially on the fact that conversion methods should be between “polymorphic” objects else we end up having everything converted/able. this is why asOrderedCollection asBag… are all between collections. So a good proposal would be to understand if we can remove asString from