On Thu, 22 May 2008 18:36:11 +0100, Nick Treleaven nick.treleaven@btinternet.com wrote:
Hi, There are a couple of things I'm wondering about changing for the API:
- Should we use underscores for struct names? E.g. _GeanyProject. I
know GTK uses this, but I've read in C programming books that tag names with a leading underscore should not be used as the compiler uses them. Also it looks a bit ugly. But I don't know if there is a portability reason why GTK uses it.
I started using the underscores because I thought this is common practise (at least I read a lot of code where underscores are used) and at some point there were problems if structs and types had the same name, so the easiest solution was to prefix the struct name with an underscore. Alternatively, we could use a suffix like _s instead. But this is a little more ugly ;-). But I don't think using different names for structs and types isn't that bad. It helps differencing the various symbols.
Regards, Enrico