[Bug 18332] Node creation method naming inconsistencies

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

--- Comment #1 from Chris Rogers <crogers@google.com> 2012-10-02 21:24:12 UTC ---
(In reply to comment #0)
> http://dvcs.w3.org/hg/audio/raw-file/tip/webaudio/specification.html#AudioContext-section
> 
> The methods for creating different AudioNodes use inconsistent naming
> conventions. Here is a list of current method -> type mappings:
> 
> createBufferSource -> AudioBufferSourceNode
> createMediaElementSource -> MediaElementAudioSourceNode
> createMediaStreamSource -> MediaStreamAudioSourceNode
> createJavaScriptNode -> JavaScriptAudioNode
> createAnalyser -> RealtimeAnalyserNode
> createGainNode -> AudioGainNode
> createDelayNode -> DelayNode
> createBiquadFilter -> BiquadFilterNode
> createPanner -> AudioPannerNode
> createConvolver -> ConvolverNode
> createChannelSplitter -> AudioChannelSplitter
> createChannelMerger -> AudioChannelMerger
> createDynamicsCompressor -> DynamicsCompressorNode
> createOscillator -> Oscillator
> 
> Apart from the inconsistently named AudioNode interfaces (see Bug 17407), the
> constructors also use a fair mix of:
> 
> * Complete interface name, e.g. createDelayNode and createOscillator
> * With Node suffix, e.g. createGainNode, createDelayNode
> * Without Node suffix, e.g. createBufferSource, createConvolver
> * With key parts of the name dropped, e.g. createAnalyzer
> 
> The only consistency I can see is that any occurrences of "Audio" in the
> interface names have been dropped in the create-method names.
> 
> Suggestion: Include the entire interface name, possibly excluding Audio prefix
> and/or Node suffix (as long as it's the same for all methods).

How about being consistent by removing the "Node" suffix, leaving all the
"create" methods the same, except for:

createGainNode -> createGain
createDelayNode -> createDelay

createJavaScriptNode -> createScriptProcessor

I'm less sure about the naming of "createScriptProcessor".  Some have suggested
that we might use other scripting languages than JavaScript, so that shouldn't
be a part of the name.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Tuesday, 2 October 2012 21:24:13 UTC