On Wed, Sep 26, 2012 at 12:33:17PM +0200, Paolo Bonzini wrote: > Il 26/09/2012 12:20, Kevin Wolf ha scritto: > >>> >> QIDL_DECLARE(RTCState) { > >>> >> > >>> >> ISADevice dev qidl(immutable); > >>> >> MemoryRegion io qidl(immutable); > >> > > >> > Just like sparse is a "compiler", so is qidl. We are free to use the > >> > '_' + lowercase prefix. > >> > > >> > ISADevice _immutable dev; > >> > > >> > It's an established practice in wide-use. > > Not commenting on the underscore, but you did one thing that I want to > > support: Put the (q)_immutable in a place where it looks like a > > qualifier. Not so important for the qidl(...) syntax, but with the > > simplified forms I definitely like it better. > > > > I think I would even have made it '(q)_immutable ISADevice dev;', but > > having the field name last is what really matters for readability. > > Agreed. I don't want to be a nuisance, so: Michael, please pick one between
Not a problem, the parser supports both before/after. I prefer before as well, except in the case of q_property("name", <options>) where we often need to put the variable name on a second line, but those aren't too common so let's just standardize on before for now since that'll benefit the common use case better. > > ISADevice QIDL(immutable) dev > ISADevice q_immutable dev > ISADevice qidl(immutable) dev > > and if you choose the second, let's make QIDL an implementation detail, > i.e. document that every new attribute we introduce should define a new > q_* macro. Ok, sounds like a plan. let's do q_*. > > Paolo >