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

Jonathan M Davis jmdavisProg at gmx.com
Sun Sep 30 23:22:27 PDT 2012


On Monday, October 01, 2012 08:14:03 Jacob Carlborg wrote:
> On 2012-10-01 06:19, Walter Bright 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.
> 
> Really, I had not idea that was possible. A workaround could be to
> convert to a string, wrap it in an exception class and pass to D.

Which would make the exception handling that much mor expensive.

I would think that making it so that proper exception types are handled 
appropriately is plenty. There are limits to what can be reasonably done (just 
like at the limits that we have already when dealing with C++ from D). It's 
already arguably rather stupid to throw anything other than a proper exception 
type even if the language will let you. At some point, it _will_ be up to the 
programmer to do the right thing regardless of what level of compatibility we 
provide.

- Jonathan M Davis


More information about the Digitalmars-d-announce mailing list