[PD-dev] Tcl/Tk code formatting and file organization

*~ chun at goto10.org
Thu Dec 25 16:38:18 CET 2008


Hans-Christoph Steiner said :
> 
> Now that I have done some coding on the new Tcl side of things, I  
> have some questions to pose here.  (crossing fingers, hoping to avoid  
> bike shed issues :D )
> 
> - 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.

I prefer longer lines, so i would pick 100:)

> 
> - 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.
> 

4 char tabs sounds good. 

> - 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:
> 

i perfer the second naming convention. i am not sure how finely splitted these tcl files should be, menus and menucommands could be in one instead of two, for example. 

cheers

chun

> pd.tk
> menus.tcl
> menucommands.tcl
> bindings.tcl
> preferences.tcl
> ...
> 
> or maybe:
> 
> pd.tk
> pdmenus.tcl
> pdmenucommands.tcl
> pdbindings.tcl
> pdpreferences.tcl
> ...
> 
> ------------------------------------------------------------------------ 
> ----
> 
> The arc of history bends towards justice.     - Dr. Martin Luther  
> King, Jr.
> 
> 
> 
> _______________________________________________
> Pd-dev mailing list
> Pd-dev at iem.at
> http://lists.puredata.info/listinfo/pd-dev
> 




More information about the Pd-dev mailing list