On Wednesday, 18 April 2012 at 10:02:49 UTC, Robert Clipsham wrote:
On 18/04/2012 09:18, "Erèbe" wrote:
Hi,

I recently discovered that D support file interface .di, but through my past reads I never seen someone using it. The std don't do usage of it (compile time issue maybe ?) and most of D project are in the same case.

Is this feature depreceated ?

I'm from a C++ background, I agree on the fact that keeping declarations and implementaions sync across two files is tedious, but when I have to
read code, I like a clean interface to summarize the thing.

Dmd doc is there to replace the need of an clean interface ?

You can find a list of deprecated features here:

http://dlang.org/deprecate

.di files are not deprecated, just rarely used. This is for a few reasons:
 * There is no requirement to use them
* They severely limit the capabilities of CTFE (http://dlang.org/function#interpretation) * DMD is really fast - the speed gain from using .di files isn't noticeable for a lot of projects * If you want them, they're very easy to generate yourself (use the -Dd and -Df compiler switches) * For the purposes of reading APIs, DDoc is normally used - alternatively, all good editors and IDEs provide code folding to hide implementations

Thanks, CTFE  is a good argument for me

Reply via email to