On Wed, Aug 29, 2012 at 5:20 PM, Boris Zbarsky <bzbar...@mit.edu> 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)  The getter is infallible.
> 2)  The return value is not returned via an outparam.
> 3)  The return value is not an interface type or is not nullable.
>
> So this IDL:
>
>   readonly attribute long foo;
>   readonly attribute Iface bar;
>   readonly attribute Iface? baz;

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.

/ Jonas
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to