Exceptional coding style

H. S. Teoh hsteoh at quickfur.ath.cx
Thu Jan 17 08:06:59 PST 2013


On Thu, Jan 17, 2013 at 08:26:16AM +0100, Era Scarecrow wrote:
> On Thursday, 17 January 2013 at 06:52:39 UTC, H. S. Teoh wrote:
> >On Thu, Jan 17, 2013 at 06:28:30AM +0100, deadalnix wrote:
> >>We are using writing to communicate between people for thousands
> >>of year now. This is clearly the most efficient way to express
> >>idea, including to a computer.
> >
> >Not to mention, linear writing developed *from* 2D drawings.
> 
>  Somehow what seems like would work good is a card-file system.
> Assuming the order of functions/declarations don't matter and you
> let the editor deal with where it places things (say, alphabetically
> or by attributes like private, pure, etc), then having a partial 3d
> view where you can flip through various function definitions &
> header documentation, then open only the function(s) of interest in
> question, hiding anything unrelated. If there's anything global or
> variables it accesses those could be listed too along with their
> type, and perhaps where the type's definition comes from for
> reference; and any functions it calls along with others with the
> same overloading name.
[...]

That sounds like a very good idea. In fact, Vim has a feature called
folding, where parts of the file are folded into a single line, to be
expanded/collapsed at will. Properly configured, this can be made to
auto-collapse all functions, nested blocks, etc., to be expanded at
will. This makes long source code much more navigable (though it doesn't
change sorting order -- I can see where that may be useful).


T

-- 
In theory, software is implemented according to the design that has been
carefully worked out beforehand. In practice, design documents are
written after the fact to describe the sorry mess that has gone on
before.


More information about the Digitalmars-d mailing list