Descent 0.5.4 released

Daniel Keep daniel.keep.lists at gmail.com
Tue Jan 27 08:31:49 PST 2009



Ary Borenszweig wrote:
> New features:
>  - Compile-time view (Window -> Show View -> Other -> D -> Compile-time
> View): allows you to see things from the compiler point of view, which
> applies some transformations to the source code. For example you can see
> what happens when you do a foreach, when you invoke an "extension
> method", when you do operator overloading; know what type has an auto
> variable; how struct fields are accessed?; compiler optimizations. It
> also removes conditionals that evaluate to false, and shows the results
> of mixins in-place. As always, this is far from perfect and a lot of
> things can be improved. For the lazies, I'll later upload a video about
> this. :-)

I've found one limitation of this, and it's a really weird one.  It
seems that some combination of a double-quoted string inside a
backtick-quoted string in a statement under a static if causes this to
fall over and break it's legs.  The CT window just shows stuff like this:

> !descent.core.dom.CompilationUnit at 17c858d

I've attached the smallest test case I was able to make; hope it helps,
because this is just about the BEST thing ever.  As someone who makes
heavy use of meta-programming, this is fantastic.

Incidentally, the backtick-quoted string seems to make the editor VERY
confused; try starting a `` literal, and pressing Enter inside.  Now
imagine trying to write a big code mixin like that...

>  - Now hovering over a mixin (over the "mixin" keyword) shows it's
> result in a popup.

*Glee*

>  - Now hovering over a function or template instance with ctrl+shift
> shows it's compile-time result (with shift only: it's source code).

Indeed, it does!  This is SO awesome; now I don't have to muck about
with pragma(msg,...) and compile-time formatting to check and make sure
I'm not feeding the compiler garbage.

> [snip]
> 
> Enjoy!

I've never been big on IDEs; I never felt that they had enough
advantages over a plain text editor to make up for the slowness and
restrictions.

But this is just so freaking awesome, I'm seriously considering moving
over to Descent for my D development.  It's just a pity I can't have my
Vim editing commands, too :P

 -- Daniel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.d
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-announce/attachments/20090128/a0fae433/attachment.asc>


More information about the Digitalmars-d-announce mailing list