Hi all, I am bulding some Strings to have nice textual representations of some of my objects. What is happening a lot is code like this: self foo , ' in ', (String with: Character cr), self bar. Is there some syntactic sugar for String with: Character cr to make these things nicer ? -- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile
On Jan 25, 2010, at 4:16 PM, Johan Fabry wrote:
Hi all,
I am bulding some Strings to have nice textual representations of some of my objects. What is happening a lot is code like this: self foo , ' in ', (String with: Character cr), self bar.
Is there some syntactic sugar for String with: Character cr to make these things nicer ?
Character cr asString ? -- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD.
On Mon, Jan 25, 2010 at 4:19 PM, Marcus Denker <marcus.denker@inria.fr>wrote:
On Jan 25, 2010, at 4:16 PM, Johan Fabry wrote:
Hi all,
I am bulding some Strings to have nice textual representations of some of my objects. What is happening a lot is code like this: self foo , ' in ', (String with: Character cr), self bar.
Is there some syntactic sugar for String with: Character cr to make these things nicer ?
Character cr asString ?
String cr ?
-- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD.
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
On Mon, Jan 25, 2010 at 4:21 PM, Mariano Martinez Peck < marianopeck@gmail.com> wrote:
On Mon, Jan 25, 2010 at 4:19 PM, Marcus Denker <marcus.denker@inria.fr>wrote:
On Jan 25, 2010, at 4:16 PM, Johan Fabry wrote:
Hi all,
I am bulding some Strings to have nice textual representations of some of my objects. What is happening a lot is code like this: self foo , ' in ', (String with: Character cr), self bar.
Is there some syntactic sugar for String with: Character cr to make these things nicer ?
Character cr asString ?
String cr ?
I meant, self foo , ' in ', String cr, self bar.
-- Marcus Denker -- http://www.marcusdenker.de INRIA Lille -- Nord Europe. Team RMoD.
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
On 25 Jan 2010, at 12:22, Mariano Martinez Peck wrote:
String cr ?
I meant, self foo , ' in ', String cr, self bar.
Nice and short, that will do. Thanks Mariano, Marcus! -- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile
On 25 Jan 2010, at 16:43, Johan Fabry wrote:
I meant, self foo , ' in ', String cr, self bar. Nice and short, that will do. Thanks Mariano, Marcus! Well, thats not what I would call nice and short... but its probably clean.
Isn't there anything better for throw away debug code? some like a nice and short (and pretty universal) '\n'? Best Stefan
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
-- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 3956 Fax: +32 2 629 3525
On Jan 25, 2010, at 5:21 PM, Stefan Marr wrote:
On 25 Jan 2010, at 16:43, Johan Fabry wrote:
I meant, self foo , ' in ', String cr, self bar. Nice and short, that will do. Thanks Mariano, Marcus! Well, thats not what I would call nice and short... but its probably clean.
Isn't there anything better for throw away debug code? some like a nice and short (and pretty universal) '\n'?
String lf :) '\ ljkljk' withCrs Stef
Best Stefan
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry PLEIAD Lab - Computer Science Department (DCC) - University of Chile
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
-- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr Phone: +32 2 629 3956 Fax: +32 2 629 3525
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
On Mon, Jan 25, 2010 at 9:07 PM, Stéphane Ducasse <stephane.ducasse@inria.fr
wrote:
On Jan 25, 2010, at 5:21 PM, Stefan Marr wrote:
On 25 Jan 2010, at 16:43, Johan Fabry wrote:
I meant, self foo , ' in ', String cr, self bar. Nice and short, that will do. Thanks Mariano, Marcus! Well, thats not what I would call nice and short... but its probably clean.
Isn't there anything better for throw away debug code? some like a nice
and short (and pretty universal) '\n'?
String lf :)
'\ ljkljk' withCrs
Cool! I wasn't aware of that one :) A minor detail, it is '\ ljkl \jk' withCRs Upper case R :)
Stef
Best Stefan
-- Johan Fabry jfabry@dcc.uchile.cl - http://dcc.uchile.cl/~jfabry<http://dcc.uchile.cl/%7Ejfabry> PLEIAD Lab - Computer Science Department (DCC) - University of Chile
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
-- Stefan Marr Software Languages Lab Vrije Universiteit Brussel Pleinlaan 2 / B-1050 Brussels / Belgium http://soft.vub.ac.be/~smarr <http://soft.vub.ac.be/%7Esmarr> Phone: +32 2 629 3956 Fax: +32 2 629 3525
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
_______________________________________________ Pharo-users mailing list Pharo-users@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-users
participants (5)
-
Johan Fabry -
Marcus Denker -
Mariano Martinez Peck -
Stefan Marr -
Stéphane Ducasse