D 1.076 Alpha for Windows 64 bits, works with VS 2010

Don Clugston dac at nospam.com
Tue Oct 9 01:19:50 PDT 2012


On 06/10/12 20:38, Walter Bright wrote:
> On 9/30/2012 9:35 PM, Andrej Mitrovic wrote:
>> On 10/1/12, Walter Bright <newshound1 at digitalmars.com> wrote:
>>> Also, consider that in C++ you can throw any type, such as an int. There
>>> is no credible way to make this work reasonably in D, as exceptions are
>>> all derived from Exception.
>>
>> Is that a bug or a feature? :)
>
>
> It's a feature, and I'm not joking.
>
> What is the compelling use case for throwing an int? How could that
> possibly fit into some encapsulation model? What if library A throws an
> int, and library B does? Now you catch an int - which did it come from?
> You've got no clue. It's indistinguishable from garbage.
>

Just imagine how much fun could be had, if D let you throw sqrt(17.0) + 
37.919i.





More information about the Digitalmars-d-announce mailing list