Some features of other development environments are "language" and some are 
"runtime/platform".  The easiest test for determining the difference is in the 
output.  In the case of TypeScript, just about every feature transpiles into 
JavaScript so it is all Language features and we could teach our compiler to 
also output some JavaScript or ActionScript equivalents.

Vector, one the other hand, is implemented in Flash, and Uint8Array is 
implemented in the browser, so these are runtime/platform features.  These are 
two different ways of implementing TypedArrays.  I find Vector a bit hard to 
work with, but I think it might be the most type-safe by making type-conversion 
or type-casting hard or slow.  Sometimes that's what you want, and sometimes 
not.

Because we want small/fast code and are currently focused on the browser, if 
folks are happy with how Uint8Array and friends would work in a type-safe 
runtime, it makes sense to me to just expose it.   If folks want to use the 
same API in SWF code, someone will have to emulate in in SWF code.  It is 
essentially the reverse workflow from E4x, TLF, and the MX/Spark Emulations.  
Instead of emulating existing SWF libraries in JS, we are emulation existing 
Browser APIs in SWF code (if anyone actually needs it).

My 2 cents,
-Alex

On 6/29/18, 1:28 AM, "[email protected] on behalf of Carlos Rovira" 
<[email protected] on behalf of [email protected]> wrote:

    Hi,
    
    I expect we evolve our languages and compilers to be smarter and we get
    things like Typed Arrays, Generics, and other things other since TypeScript
    or haXe already supports it. So I talk with many people that said me "why
    use AS3 when I can use TypeScript that has all this things and are most
    widely supported?"... and we must said that this people are right...
    
    This is not my zone of expertise, so hope others could make this happen. I
    think we have the tools and all the pieces to do this, so it's a matter of
    having the right people that want to make this possible.
    
    Thanks
    
    Carlos
    
    
    2018-06-29 10:12 GMT+02:00 Harbs <[email protected]>:
    
    > There is something I’ve been struggling with:
    >
    > AS3 does not have “typed” arrays. The closest it has is Vectors. The
    > problem with vectors is two-fold. First of all, the cross compiler uses
    > Language to construct the vector rather than simply declaring an array.
    > This could probably be fixed though. The second problem is that it’s
    > awkward converting between arrays and vectors. This is especially
    > problematic when you want to “cast” an array retrieved from say JSON to a
    > typed Vector. It’s also a problem if you want to use Array features such 
as
    > map and the like.
    >
    > I’m not sure what the right solution to improving this would be. Expand
    > Vector to allow arrays and Vectors to be cast as each other? Create a new
    > “array type" declaration (i.e. var arr:String[] = [“foo”,”baz”];)?
    > Something else?
    >
    > Thoughts?
    > Harbs
    >
    >
    
    
    -- 
    Carlos Rovira
    
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ccec8d2b3b95c4dafa1eb08d5dd9a40cf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636658576937928781&sdata=D78a%2B0XK4YtbwNMTw828wXrIMr7oRHmXpurGdyotIQY%3D&reserved=0
    

Reply via email to