digitalmars.D - Re: Is D open for different code conventions?
- renoX <renosky free.fr> Jul 30 2007
- eao197 <eao197 intervale.ru> Jul 30 2007
eao197 Wrote:I just want to ask D's community: it is appropriate if some projects will use different code convention?
Maybe there should be a vote? I don't like at all CamelCase either.. [cut]I think it would be good if there will be possibility to use different code convention in D. For example, like Ruby's: CamelCase for class names and lower_case for method names, or like C++ ACE's: Camel_Case for classes and lower_case for methods.
Restricting CamelCase to class name is a good compromise, I agree. That said even for class name/typename, there is some weird 'double standard': I doubt that you'll find many people who want to switch from 'int' to 'Int'.. renoX-- Regards, Yauheni Akhotnikau
Jul 30 2007
On Mon, 30 Jul 2007 14:46:47 +0400, renoX <renosky free.fr> wrote:eao197 Wrote:I just want to ask D's community: it is appropriate if some projects will use different code convention?
Maybe there should be a vote?
I don't think that a vote is appropriate here. IMHO, the better way is allow to use different code conventions. Yes it leads to styles mixture (like in C++ when a project uses Qt+ACE+boost), but C++ show that it isn't a big problem. It is not a good idea to mix different styles in some kind of projects, like reusable libraries (for example it is bad idea to add new code to Tango in a different style). But when I wrote my own project with Tango I want to use my own code convention.That said even for class name/typename, there is some weird 'double standard': I doubt that you'll find many people who want to switch from 'int' to 'Int'..
AFAIK, 'int' is not a class, so it isn't a problem :) -- Regards, Yauheni Akhotnikau
Jul 30 2007