std.format add dash separators to large numbers

Jouko Koski joukokoskispam101 at netti.fi
Wed Aug 17 12:47:03 PDT 2011


"Andrej Mitrovic" <andrej.mitrovich at gmail.com> kirjoitti:
> Okay but I wasn't really thinking about locales, underscores between
> digits is a D syntax feature and it makes numbers more readable.

I agree that using almost any (thousand) separator can make reading long 
numeric strings easier. I would still consider not exporting D's internal 
syntactical construct to outside world where it is never used that way. I do 
not favor any solution which is D-specific or suitable for insular Yankees 
only.

This sort of wrestling has already carried out in the past. For instance, 
the C90 standard work was prolonged by about a year because of adding the 
<locale.h> features that international community required. D can utilize 
maybe brighter technical solution, but still: No D-specific solutions and no 
localization as afterthought, please!

-- 
Jouko



More information about the Digitalmars-d-learn mailing list