The Right Approach to Exceptions

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Feb 20 16:24:27 PST 2012


On 2/20/12 5:51 PM, Nick Sabalausky wrote:
> "Andrei Alexandrescu"<SeeWebsiteForEmail at erdani.org>  wrote in message
> news:jhub5b$1rj5$2 at digitalmars.com...
>> On 2/20/12 1:13 PM, Sean Kelly wrote:
>>> but either way I think the point of the table is for
>>> localized error messages.  I wouldn't expect any data relevant for
>>> filtering the exception within the table.
>>
>> Exactly.
>>
>> The need for Variant instead of string is mainly to distinguish numeric
>> info from string info when doing things like singular vs. plural or Arabic
>> numeral rendering vs. textual ("one", "two" etc).
>>
>
> So like Jacob mentioned and you denied, you *are* advocating putting at
> least some i18n into exceptions.

No. I am simply enabling a variety of applications, with i18n as an 
obvious one. Encoding numbers as strings may force decoding later. It's 
just unnecessary.

Andrei



More information about the Digitalmars-d mailing list