[whatwg] Canvas 2d methods

Vladimir Vukicevic wrote:

> Even without using |with|, why not just create a simple JS wrapper for
> the context object that can have return-this or any other desired
> semantics?  

This is possible, but I consider the canvas implementation as too 
performance critical to slow it down by such a wrapper. I could live 
with it, if it were to use only for some upgrading time.

> This would avoid a change that would have some apps
> require "canvas 2D 2.0" or some such, and require authors to do
> version checks to see which version of canvas is supported -- and
> still write "old" code for quite some time.

You are arguing here generally against any possible extension of the API 
in the future. Please note, that this minor change of the API does not 
affect existing code.

>   Adding "a different way"
> to do the same things that can be done now without much benefit in
> simplicity or efficiency doesn't seem useful.

Some users on this list -- me included -- and a certain part of the 
future user base of the canvas element may see a benefit in familiar 
coding style which they might call "simplicity".
The benefit in efficiency might be significant due to optimizing 
interpreters, but is measurable only with at least one implementation.

> Canvas supports multiple contexts for a reason; if there are
> compelling arguments for a complete rev of the 2D API, then a new
> context can be introduced to support that.

Great feature of Canvas to support multiple contexts. I would welcome 
the introduction of such a new context.

--
Stefan G?ssner
http://goessner.net

Received on Thursday, 6 July 2006 17:06:26 UTC