The Right Approach to Exceptions

Andrej Mitrovic andrej.mitrovich at gmail.com
Mon Feb 20 11:36:56 PST 2012


On 2/20/12, Juan Manuel Cabo <juanmanuel.cabo at gmail.com> wrote:
> will be trouble. Instead please do:
>
>         "The '%1$s' file's size is %2$d which is wrong"
>

That is the shittiest formatting specifier ever invented. The
unreadability of it is why I never, ever, use it. Python solved this
nicely with its {0} {1} syntax:

>>> print '{0} and {1}'.format('foo', 'bar')


More information about the Digitalmars-d mailing list