[erlang-questions] Style wars: junk comments

Vlad Dumitrescu <>
Wed Sep 12 21:25:21 CEST 2012


On Wed, Sep 12, 2012 at 6:58 PM, David Mercer <> wrote:
> On Wednesday, September 12, 2012, Vlad Dumitrescu wrote:
>> a feature where the related
>> functions can be shown together in the editor, regardless of where
>> they are located in the file. Also we could group and arrange the
>> source code too, using topological sort based on the dependencies.
>
> (1) Anyone know of any good directed graph clustering and serialization
> algorithm that might be appropriate for this?
> (2) How would we handle semantically related but dependency unrelated
> functions, such as start & stop, push & pop, add & remove, etc.?

I think that generic algorithms would not work well enough because, as
#2 above asks, there are specific constraints for this use case. Some
of these will be up to the developer's taste, so the algorithm needs
to be configurable in this respect. There may be such algorithms, but
I couldn't find any that wouldn't need heavy customization.

One simple idea about #2 is to use multiple -export declarations to do
the grouping. In many cases this is something that people already do.
But then we come to the "taste"-related questions: do you want 'start'
and 'stop' together and both their helpers right after, or do you want
'start', its helpers, 'stop', its helpers? It could become a mess
trying to satisfy all these conflicting requirements, though.

regards,
Vlad



More information about the erlang-questions mailing list