typed array strawman proposal

Brendan Eich brendan at mozilla.com
Wed Jan 27 10:17:04 PST 2010


On Jan 27, 2010, at 10:15 AM, P T Withington wrote:

> On 2010-01-27, at 13:06, Brendan Eich wrote:
>
>> Anyway, we do not want to require exotic techniques. We want to  
>> allow C++ implementations, which require constants to avoid obvious  
>> performance hits for no good reason. Competition will kill any  
>> browser foolish enough to take such hits.
>
> That seems inconsistent with the philosophy that classes can be  
> syntactic sugar on closures that will be magically optimized.

That philosophy cannot possibly implement native GPU-oriented fixed- 
size machine-int-element-typed arrays!


> I'm just seconding the suggestion that you could have a flexible  
> syntax that would allow specifying any byte width and offset and  
> optimize the cases where the byte width and offset are known at  
> compile time.  Instead of guessing which of the n*m combinations you  
> should cast in stone as built-in types.

Generality is a disease in design. "It would be nice" is a malediction.

/be


More information about the es-discuss mailing list