Ddbg 0.0.4 alpha release

Bill Baxter dnewsgroup at billbaxter.com
Mon Mar 5 16:12:20 PST 2007


Jascha Wetzel wrote:
> slices are supported. in your example, the cast needs to be in brackets,
> though: (cast(int[])hugelist)[200..210]

Ah, ok.  I didn't think to try that for some reason.

So what do you think about allowing C-style (or even better -- c++ 
style) casts?

I think the various reasons they are not allowed in D do not really 
apply to an interactive debugger.  The main thing you want in a debugger 
is just something easy to type and read.  I think C++ function-style 
casts fit the bill very nicely there.

In Visual Studio for instance I find I often end up with ridiculous 
looking watch expressions that are hard to read because of the cast syntax.

Just a thought.  Basically idea is that the debugger cast syntax doesn't 
*have* to look like the language syntax.  (Note that in Visual Studio, 
for example, C cast syntax is all that's supported whether you're 
debugging C or C++).

--bb



More information about the Digitalmars-d-announce mailing list