The Right Approach to Exceptions
Alex Rønne Petersen
xtzgzorex at gmail.com
Sat Feb 18 15:11:04 PST 2012
On 18-02-2012 23:35, Timon Gehr wrote:
> On 02/18/2012 10:38 PM, Alex Rønne Petersen wrote:
>> On 18-02-2012 22:30, Timon Gehr wrote:
>>> On 02/18/2012 10:25 PM, Alex Rønne Petersen wrote:
>>>>
>>>> I'd just like to add to this that we don't lose anything per se by
>>>> introducing specific exception types. People can still catch Exception
>>>> if they really, really want.
>>>>
>>>
>>> We gain executable bloat. I don't know how how significant the amount
>>> would be.
>>
>> For a single class
>
> You want to add only one specific exception type?
No, but I have a hard time imagining that even the accumulated amount of
exceptions will matter.
>
>> that has nothing but a constructor?
>
> They also have vtbls and TypeInfos.
True. But aren't we micro-optimizing here?
>
>> Negligible IMHO.
>>
>
> Possible.
--
- Alex
More information about the Digitalmars-d
mailing list