overcomming inconsistent behaviour of format for array

user1234 user1234 at 1234.de
Thu Dec 26 13:12:51 UTC 2019

On Thursday, 26 December 2019 at 12:19:56 UTC, berni44 wrote:
> You're probably pretty well aware, that format prints quotes 
> arround strings, when the strings are inside of an array, while 
> not doing so, when not. To avoid this, a dash-flag can be used. 
> This causes problems, when width is also specified, because the 
> dash has now two different meanings: Left-justification and 
> quote-removal. Adding to this, the current implementation is 
> inconsistent with justification/width. See also [1], where I 
> ran into problems, while fixing this. Here a few examples:
> [...]
> I think, this will end up, being a DIP, but before writing the 
> DIP in all details, I'd like to get some feedback. :-) What do 
> you think about it?

Some languages have an option struct for their format. In D and 
if not existing yet this would be like adding a new global 
`__gshared FormatOption formatOption`. controlling the 
deprecation period from there would be possible.

More information about the Digitalmars-d mailing list