[Geany-Devel] Geany using standard types

Matthew Brush mbrush at xxxxx
Sun Aug 18 10:54:04 UTC 2013


On 13-08-18 03:49 AM, Lex Trotman wrote:
> On 18 August 2013 19:32, Matthew Brush <mbrush at codebrainz.ca> wrote:
>
>> Hi,
>>
>> It was pointed out to me on IRC that I went into too much details/patches
>> and muddied the original question, so I propose it again more simply:
>>
>> "Do you agree it would be better for Geany to use standard C types as
>> opposed to GLib types which are typedef'd to the exact same thing?" (ex.
>> gint->int, glong->long, gchar->char etc.)
>>
>
> Personally I can't find any great positives or negatives, but then I've
> trained my eyes to read gint as int, others may find standard code more
> attractive (or vice versa).
>
> What I would be worried about is changing the existing code to use the
> standard types.  Matthew has kindly illustrated the size of such a change,
> and while I'm sure 99.99% of the changes are fine, I would worry about the
> few places it might not be semantically equivalent, no matter how good the
> regexes that made the change are.  The size of the change means we are
> never going to manually inspect it, and the places it will go wrong are not
> obvious, so we can't easily point to examples.
>

I think you could manually reason about the changes though, the actual 
branch is of course a series of steps along the way (as opposed to 
monolithic patch dumped here) and excluding gboolean->_Bool, I don't 
think any of the semantics changed (based on studying of GLib headers).

> So whilst I wouldn't advocate changing the existing code (at least en bloc)
> I don't see any reason for disallowing standard types in new code and
> changes to existing code as it is touched.
>

The main thing here is consistency across the codebase, I guess.

Cheers,
Matthew Brush


More information about the Devel mailing list