Re: [Vala] error domain constant names



On Fri, 2009-05-08 at 13:05 +0200, Michael 'Mickey' Lauer wrote:
With the recent introduction of proper dbus error marshalling courtesy Didier 
Ptitjes, he and me ran into an argument about error domain constant names and 
we'd like your input.

Since the dbus error names are getting CamelCased, I think it's cleaner to use 
CamelCased names for error constants locally as well -- his position is that 
it's Vala convention to use CONSTANT_NAMED error constants.

What's your take on that?

In general, I prefer consistent naming in Vala, independent of backend
specifics such as C or D-Bus conventions. Following that, I'd agree with
Didier that CONSTANT_NAMED should be used. We should certainly support
overriding the default name mangling with an attribute, though.

However, I understand that such name mangling should be avoided wherever
possible as there are various issues with it like name conflicts and
D-Bus services that don't follow the D-Bus conventions.

I don't think there is a perfect solution for this. Unless we change the
D-Bus method name mangling we already do in Vala, we should follow the
same path with D-Bus errors, though. It doesn't make sense to do
something different for methods and errors here.

Jürg




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]