Hi, Achim! My letter was not about what is better code & naming style: camelcase or underscore. My letter was about single code rules for W3AF.
On Wed, 31 Mar 2010 10:34:14 +0200 (MEST) Achim Hoffmann <a...@securenet.de> wrote: > Hi Taras, > > I guess you'll unintentionally start a philosophic discussion here. > > !! - afd > !! - allowedMethods > !! - archiveDotOrg > !! - bing_spider > !! - content_negotiation > !! ... > !! > !! We can see 2 different naming styles here. > !! Also in code we can see the same: some methods called as > !! foo_action_ff() and some in camelcase convention. > !! As I think it's of course not so important as other bugs in w3af > but !! also not good =) > !! > !! What I suggest is to start writting "W3AF Dev Guide" and follow it. > !! It also will help new developers of w3af and w3af plugins to start > !! quickly. I can prepare lite draft version. > !! > !! What do you think about it? > > If you think OO, namings would be something like: > > Object{}; // the Object object > Object.create(); // Object create method > Object.value; // a private/public constant/variable in Object > > Things may become crazy if the "object" is an interface: > > Methods{}; > Methods.initialize(); > Methods.create(Object); > > Note: replace Object and Method to whatever word you like. > > Now compare to functional/procedural namings: > > object{}; // the object object > object_create(); // object create method > object_delete(); > > methods{}; > methods_create(object); > methods_delete(object); > > Some people prefer a "natural language" style naming: > > object{}; > methods{}; > create_object(); > create_method(object); > delete_object(); > > ... and so on. You get the idea, do you? > IMHO, each has it's pros and cons. > > Traditionally macro names have been written in all uppercase, to > distinguish pre-compiler constants from other constants. But often > constants are written in all uppercase too (accidently?). > Modern developers prefer camle case in strong belief that it is > better readable/understandable for humans. > Try: KIIl K1ll kIll ki11 z00 z0O zOO > > Just my 2 pence. > Achim > ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ W3af-develop mailing list W3af-develop@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/w3af-develop