Welcome, Guest. Please login or register.
Amiga Kit Amiga Store Iridium Banner AMIStore App Store A1200/A600 4xIDE Interface

AuthorTopic: Naming conventions and type definition  (Read 806 times)

0 Members and 1 Guest are viewing this topic.

Offline Mr_Capehill

Naming conventions and type definition
« 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?


Offline Karlos

Re: Naming conventions and type definition
« Reply #1 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.
int p; // A