DIP10005: Dependency-Carrying Declarations is now available for community feedback

Jacob Carlborg via Digitalmars-d digitalmars-d at puremagic.com
Mon Dec 19 04:32:10 PST 2016


On 2016-12-18 14:38, Andrei Alexandrescu wrote:

> How does the lack of the feature save lines? Doesn't it just move them
> elsewhere?

Yes, I was referring to the file containing the implementation.

> Does that include full documentation and unittests?

It does not count the documentation in those lines. It would count the 
unit tests because there's no special syntax for that, just regular Ruby 
code. But one would most likely not have the implementation and the unit 
tests in the same file.

> Phobos' average file size 2055 is lines and median file size is 903
> lines. Do you find these appropriate for your preferences, considering
> this size includes documentation and unittests?

I would prefer smaller, but I would also prefer to have the unit tests 
separately.

> Would you find it helpful to use a tool that collapses these?

It's more helpful, yes. I do have that but since signatures in D can be 
arbitrary complex I'm doubtful that there's a tool/editor can fold all 
signatures that are valid in D. I know that TextMate that I use cannot. 
Take this for example:

typeof({
     class Foo
     {
         void bar()
         {
         }
     }
}) foo ();

I know that that's highly unlikely to happen in the real world but it 
shows how problematic it is to fold D code.

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list