3 Jan 2009 22:48
Re: Tcl/Tk code formatting and file organization
Sorry for the slow response on this one... > - first, does anyone object to making the Tcl files use 90 or 100 > character widths? Tcl lines tend to be long and 80 char width tends > to cause a lot of really ugly lines. > This would cause me much misery since I often depend on 'terminal' editors that can't be conveniently reformatted by file. Plus, it's hard to know where to draw the line. > - second, I think we should use a similar tab format as the C side, > but cleaner: 4 char tabs, all spaces or maybe all tabs. > I've "always" used 4-character indents, no tabs (except for makefile.in :) Various contributed code deviates from that, and when I have to actually look at it I feel at liberty to thrash it into the pd "standard". There are some bits I'm afraid to touch, such as the ALSA MIDI code, since I don't have any setup on which to test it. I think it causes great confusion to use hard tabs in the code. If they're absolutely unavoidable let's keep them to 8 spaces (the most standard value even if it doesn't agree with the indentation style.) > - third, I am thinking that the Tcl should be broken up into single- > file packages where the package name and the file name are the same. > For example: > > pd.tk > menus.tcl(Continue reading)
There are some really unreadable sections of u_main.tk that would be
more readable with a bit more room, like 90 chars. I am fine with
leaving the C code at 80 chars, but Tcl tends to have a lot of long
lines, and often doesn't wrap cleanly.
>> - second, I think we should use a similar tab format as the C side,
>> but cleaner: 4 char tabs, all spaces or maybe all tabs.
>>
> I've "always" used 4-character indents, no tabs (except for
RSS Feed