[squeak-dev] The Inbox: Collections-ct.851.mcz

Marcel Taeumel marcel.taeumel at hpi.de
Mon Aug 19 14:39:47 UTC 2019


Hi, all. :-)

I think that it would be better to only allow a small set of characters to be used as placeholders. So, -1 for Unicode support in {}-placeholders. Unicode applications should have to convert user-defined unicode patterns manually if they want to support unicode placeholders.

Here are some benchmarks. Not that much difference.

[ '{2} He\{ll\}o {1} World!' format: { 'Smalltalk' . 'Hey' } ] bench.

'BEFORE: 1,270,000 per second. 789 nanoseconds per run.'
'AFTER: 1,070,000 per second. 931 nanoseconds per run.'

Best,
Marcel
Am 16.08.2019 14:50:00 schrieb Jakob Reschke <forums.jakob at resfarm.de>:
Am Fr., 16. Aug. 2019 um 14:38 Uhr schrieb Thiede, Christoph <Christoph.Thiede at student.hpi.uni-potsdam.de [mailto:Christoph.Thiede at student.hpi.uni-potsdam.de]>:

> I personally see little value in having 63 ways to write a single digit in my Smalltalk method.


But if we don't support this, we are breaking with the standards from NumberParser. Wouldn't this be inconsistent?

What is the objective of NumberParser? Parse numbers from arbitrary sources of text? Then I would say it has a different scope than what is required for the formatting placeholders.

If SqNumberParser is the one that is used to parse numbers from Smalltalk expressions and if it supports non-ascii digits, then I wonder whether this is really desired behavior.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20190819/16a85566/attachment.html>


More information about the Squeak-dev mailing list