Re: Arrays and types

2018-06-30 Thread Alex Harui


On 6/29/18, 11:33 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" 
 wrote:

Hi,

another thing we could do is support TypeScript at same level as AS3. What
do you think about this?
Maybe this could make more people come to Royale. TypeScript seems the
language of this days, and maybe parsers and tools to integrate it should
be available so maybe, it could be a task doable...

I'm sure it is doable, but I would rather we focus the people we have on 
getting AS3 transpiling to JS so we can attract customers migrating from Flex.

My 2 cents,
-Alex


2018-06-29 18:28 GMT+02:00 Alex Harui :

> 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, "carlos.rov...@gmail.com on behalf of Carlos
> Rovira" 
> 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 :
>
> > 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=02%7C01%7Caharui%40adobe.com%
> 7Ccec8d2b3b95c4dafa1eb08d5dd9a40cf%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C1%7C636658576937928781=D78a%
> 2B0XK4YtbwNMTw828wXrIMr7oRHmXpurGdyotIQY%3D=0
>
>
>


-- 
Carlos Rovira

https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira=02%7C01%7Caharui%40adobe.com%7Cd53418644bb4a70f08d5ddeedb39%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636658940304858951=%2FZfgQcWVsgcyG%2FJr0MZTHPARaruS0ManZEDWN4zZmjE%3D=0




Re: Arrays and types

2018-06-29 Thread Carlos Rovira
Hi,

another thing we could do is support TypeScript at same level as AS3. What
do you think about this?
Maybe this could make more people come to Royale. TypeScript seems the
language of this days, and maybe parsers and tools to integrate it should
be available so maybe, it could be a task doable...



2018-06-29 18:28 GMT+02:00 Alex Harui :

> 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, "carlos.rov...@gmail.com on behalf of Carlos
> Rovira" 
> 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 :
>
> > 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=02%7C01%7Caharui%40adobe.com%
> 7Ccec8d2b3b95c4dafa1eb08d5dd9a40cf%7Cfa7b1b5a7b34438794aed2c178de
> cee1%7C0%7C1%7C636658576937928781=D78a%
> 2B0XK4YtbwNMTw828wXrIMr7oRHmXpurGdyotIQY%3D=0
>
>
>


-- 
Carlos Rovira
http://about.me/carlosrovira


Re: Arrays and types

2018-06-29 Thread Alex Harui
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, "carlos.rov...@gmail.com on behalf of Carlos Rovira" 
 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 :

> 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=02%7C01%7Caharui%40adobe.com%7Ccec8d2b3b95c4dafa1eb08d5dd9a40cf%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C1%7C636658576937928781=D78a%2B0XK4YtbwNMTw828wXrIMr7oRHmXpurGdyotIQY%3D=0




Re: Arrays and types

2018-06-29 Thread Carlos Rovira
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 :

> 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
http://about.me/carlosrovira


Arrays and types

2018-06-29 Thread Harbs
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