[Bug 27301] Define context variables, such as "context object"

https://www.w3.org/Bugs/Public/show_bug.cgi?id=27301

--- Comment #2 from Anne <annevk@annevk.nl> ---
I thought about this a bit and how it would be best to define this. I think it
would make the most sense if IDL derived the algorithm it has to invoke from
the interface/class and then invokes it with a set of parameters.

So e.g.

  interface SomeClass {
    boolean someMethod();
  }

ends up generating an algorithm name SomeClassSomeMethod that IDL invokes with
"this" as the first argument and in this case no other arguments since
someMethod() takes none. The specification that defines this interface would
define the SomeClassSomeMethod algorithm.

That gets us much closer to a formal way of defining APIs. For getter/setter
properties you'd obviously have two such algorithms, the latter passed a value
argument along with "this". Note that for getter/setter we could also generate
default algorithms, once bug 27354 is fixed, so that specifications only need
to define these algorithms if something more complex happens than getting and
setting an internal slot.

(And then further in the future IDL could standardize the metalanguage used in
these algorithms, such as "return", "continue", loops, etc. Which will
hopefully make specifications more readable than they are now.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.

Received on Monday, 13 July 2015 07:06:52 UTC