Re: GObject's property with _ issue
Torben Nehmer <[email protected]> Mon, 20 Feb 2006 11:44:04 +0100
| Newsgroups | gmane.comp.web.midgard.devel |
|---|---|
| Message-ID | <[email protected]> |
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, - --Jukka Zitting wrote on 2006-02-20 11:26: >> I am not sure what to do exactly with underscore used in property name. >> Gobject library replaces all '_' with '-' in property name. >> >> 1. Trigger an error while schema is parsed? >> 2. Trigger a warning and wait for unconditional errors? >> 3. Use black magic for such properties? >> >> The first one seems to me the only one solution. > > With 1 we should define CamelCase as the preferred property naming > convention. This is a bit awkward as it interferes with the GObject > naming convention. I would go a step further, limiting schema field names to [a-z][a-z0-9]*. Not all client languages (namely PHP) are case-sensitive when it comes down to variable names. I'd enforce this naming also in DM2 schema field names, to stay consistent. It is not the nicest of all solutions, but for data field names, it usually suffices. > Option 3 is also reasonable, we'd need to translate dashes back to > underscores in language bindings and when generating SQL. I'm against inhereant black magic... Live long and Prosper! Torben Nehmer - -- Torben Nehmer, Guenzburg, Bavaria, Germany http://www.nathan-syntronics.de, mailto:[email protected] PGP Public Key: https://www.link-m.de/pgp/t.nehmer.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (MingW32) Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org iD8DBQFD+Z1zJPh4Kn6d5FYRApXYAJ91Jm3RUm/ECPjPGf0ZXk3krhf10wCg09aY dJP2CXRrStLzdMKeMNendSw= =DCHv -----END PGP SIGNATURE-----