Re: Attribute getter naming in WebIDL bindings

2012-08-30 Thread Jonas Sicking
On Thu, Aug 30, 2012 at 10:06 AM, Boris Zbarsky wrote: > On 8/30/12 8:26 AM, Jonas Sicking wrote: >> >> What would >> >>readonly attribute long? bin; >> >> compile into? If it compiles into something called GetBin then we'd >> have a nice consistency that any getters for nullable types are nam

Re: Attribute getter naming in WebIDL bindings

2012-08-30 Thread Boris Zbarsky
On 8/30/12 8:26 AM, Jonas Sicking wrote: What would readonly attribute long? bin; compile into? If it compiles into something called GetBin then we'd have a nice consistency that any getters for nullable types are named GetX and any getters for non-nullable types are named X. I was going t

Re: Attribute getter naming in WebIDL bindings

2012-08-30 Thread Boris Zbarsky
On 8/30/12 4:16 AM, Ms2ger wrote: It certainly looks nicer, but I'm not a big fan of complicating the rules for assembling the C++ signature from the WebIDL. XPIDL's consistency here, IMO, saves time when implementing an interface: you can focus on the actual implementation, rather than the bindi

Re: Attribute getter naming in WebIDL bindings

2012-08-30 Thread Jonas Sicking
On Wed, Aug 29, 2012 at 5:20 PM, Boris Zbarsky wrote: > Right now, attribute getters always get prefixed with "Get" in the WebIDL > bindings. So "readonly attribute long foo" becomes "int32_t GetFoo()" in > the C++. > > Would it make sense to drop the Get in certain cases? In particular, in > ca

Re: Attribute getter naming in WebIDL bindings

2012-08-30 Thread Ms2ger
On 08/29/2012 10:20 PM, Boris Zbarsky wrote: Right now, attribute getters always get prefixed with "Get" in the WebIDL bindings. So "readonly attribute long foo" becomes "int32_t GetFoo()" in the C++. Would it make sense to drop the Get in certain cases? In particular, in cases in which: 1)

Re: Attribute getter naming in WebIDL bindings

2012-08-29 Thread Ehsan Akhgari
On 12-08-29 4:32 PM, Kyle Huey wrote: Thoughts? Sounds great! Sounds lovely! Ehsan ___ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform

Re: Attribute getter naming in WebIDL bindings

2012-08-29 Thread Kyle Huey
On Wed, Aug 29, 2012 at 1:20 PM, Boris Zbarsky wrote: > Right now, attribute getters always get prefixed with "Get" in the WebIDL > bindings. So "readonly attribute long foo" becomes "int32_t GetFoo()" in > the C++. > > Would it make sense to drop the Get in certain cases? In particular, in > c

Attribute getter naming in WebIDL bindings

2012-08-29 Thread Boris Zbarsky
Right now, attribute getters always get prefixed with "Get" in the WebIDL bindings. So "readonly attribute long foo" becomes "int32_t GetFoo()" in the C++. Would it make sense to drop the Get in certain cases? In particular, in cases in which: 1) The getter is infallible. 2) The return v