The ES6 specification states that abstract operations are not part of the language, but they are used internally. Some of these operations, such as CreateHTML look generally useful... Is there really no way of accessing them? No deep prototype hackery to get at these functions?
When one is describing the semantics of a programming language / API it is really important to get everything right and non-ambiguous. Imagine now that you are describing how should String.prototype.fontcolor(color)
work. That's part of the API that you need define so you must be rigorous about it and you start listing requirements:
Now if you have repeating requirements for multiple functions, then you can generalize those requirements and just tell whoever's implementing the standard to apply the requirements to some other function (e.g. 'Requirements 1 and 2 also hold for String.prototype.fontsize
'). Instead of just saying 'Requirements 1 and 2 also hold for...' you can define the public API operations using an abstract operation e.g. 'Call RequirementsForStringPrototypeAcceptingOneArgument and exit if it returns false' where RequirementsForStringPrototypeAcceptingOneArgument contains req. 1 and 2.
Note that those requirements themselves are not part of the API. There aren't designed to be and there's no need for them to be - there are just a tool for avoiding repetition in the standard. The implementation may really choose to have a CreateHTML
function somewhere but it may as well just put a bunch of if
statements if they deem it better. Thus, no, there's no way to access these operations as