royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rovira <carlosrov...@apache.org>
Subject Re: Arrays and types
Date Fri, 29 Jun 2018 08:27:47 GMT
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 <harbs.lists@gmail.com>:

> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message