[squeak-dev] String>expandMacros rules?

Chris Muller asqueaker at gmail.com
Mon Mar 6 16:49:57 UTC 2017


>>> On 05-03-2017, at 3:08 PM, Levente Uzonyi <leves at caesar.elte.hu> wrote:
>>>
>>> We already have #format:, which is why #expandMacros* is not being used at all.
>>
>> OK; then we should remove the redundant stuff some time.
>>
>>> I don't think we need a third implementation unless it provides
>>> something the other two doesn’t.
>>
>> Oh, the printf stuff most definitely adds something;
>>
>>       ‘%-0.1e’ printf: x
>> is a whole lot nicer than
>>      (x printShowingDecimalPlaces: 1) padded: #left to: 1 with: $0
>
> I would really say the other way round.
> Really, frist is faster to write, but second is easier to read.
> I don't have to memorize what character means left or right padding, what number means precision and what means overall length and such.
>
> I think the first one is trying too hard (why, yes, C, I am looking at you)

My thoughts exactly!


More information about the Squeak-dev mailing list