Amiga.org

Operating System Specific Discussions => Amiga OS => Amiga OS -- Development => Topic started by: Mr_Capehill on May 13, 2004, 02:12:47 PM

Title: Naming conventions and type definition
Post by: Mr_Capehill on May 13, 2004, 02:12:47 PM
Hello, I'm starting a cross-platform project and wondering what kind of naming convention I should go for. I think that Hungarian notation is an ugly overkill solution for me. Also: do you begin member functions with a capital letter? Class name with 'C'?

Another problem is deciding if I should use my own types for int, float etc...Any good suggestions here?

Thanks...
Title: Re: Naming conventions and type definition
Post by: Karlos on May 13, 2004, 02:30:22 PM
I use the UML style (as used in java).

Capital letter for the beginning of each word in the name of a class or struct, eg: "MyClassName".

All class members have lowercase first word then upper for every following one, eg "myMethodName(), myVariable"

All constants are uppercase.

All elemental types (and in C/C++ typedefs thereof) are lowercase, eg "int32, uint32".

AmigaOS has its own standards for stuff, but my code always sits a layer above so I never see it outside of some implementation.