- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Thu, 18 Oct 2012 10:11:13 -0400
- To: "public-script-coord@w3.org" <public-script-coord@w3.org>
Consider a method declaration like so: MyInterface getFoo(); It's impossible to tell from that IDL whether you get back the same object every time or whether the same object is returned each time, or whether it's sometimes the same and sometimes a new one. Generally you have to rely on the prose to indicate that, and often the writers of the prose forget to do so. In Gecko, we have found it useful to annotate methods and attributes with this sort of information (we use [Creator] for methods that always return a new object and we're about to add an annotation for attributes that always return the same object, but we haven't decided on a name for it yet). Would it make sense to add such annotations to WebIDL so that this sort of thing doesn't have to be described in prose? -Boris
Received on Thursday, 18 October 2012 14:11:45 UTC