[Pharo-project] bindWith: implementation missing
#bindWith: is the same as using #format but not using "{x}" syntax but "%x" syntax instead. In Pharo you we usualy write: 'foo {1} bar' format: {Date today} which returns 'foo 11 July 2012 bar' I think it was VisualAge that used #bindWith: and % as marker, so if you want to port code from that Smalltalk to Pharo it may be helpful to add support for that. So it does the same - only a little bit different: 'foo %1 bar' bindWith: Date today aString Thats why it is now in http://ss3.gemstone.com/ss/PharoGoodies.html Another option is to rewrite code to use #format: Bye T.
I write a new application and will use format: now. Thanks;-) On Wed, Jul 11, 2012 at 4:03 PM, Torsten Bergmann <astares@gmx.de> wrote:
#bindWith: is the same as using #format but not using "{x}" syntax but "%x" syntax instead.
In Pharo you we usualy write:
'foo {1} bar' format: {Date today}
which returns 'foo 11 July 2012 bar'
I think it was VisualAge that used #bindWith: and % as marker, so if you want to port code from that Smalltalk to Pharo it may be helpful to add support for that.
So it does the same - only a little bit different:
'foo %1 bar' bindWith: Date today aString
Thats why it is now in http://ss3.gemstone.com/ss/PharoGoodies.html Another option is to rewrite code to use #format:
Bye T.
participants (2)
-
Sabine Knöfel -
Torsten Bergmann