equivariant functions

Bill Baxter wbaxter at gmail.com
Wed Oct 15 14:37:14 PDT 2008


On Thu, Oct 16, 2008 at 5:57 AM, Andrei Alexandrescu
<SeeWebsiteForEmail at erdani.org> wrote:
> Bill Baxter wrote:
>>
>> If the top of the block is off the screen it's not necessarily obvious
>> that it's a block.
>
> By the same argument it's not obvious whether you're in a class, function,
> template etc. definition. All of them do change the context of what's going
> on.

The fact that I have to keep one thing in mind does not make an excuse
for creating several other things I also have to keep in mind.
I've heard the human mind can keep about 7 or 8 things active at once.
 It's a limited number.  So the more info you can keep local the
better.  Same reason we don't declare all our variables at the tops of
functions any more.  Declaration at the point of use makes the type
more readily available at the point in the code where you need to know
it.

Anyway, I've got no problem with collecting things in attribute blocks
like that, as long as the blocks stay less than roughly a page in
length.
Similar to the commonly use rule of thumb for function length.

--bb



More information about the Digitalmars-d mailing list