Hello, nice to meet you!
Your objective if create something to translate java code to action script? Well, i work in a project and development a software to translate, but the software dont work to screens, just work for models.
Why? Because the concept of this tecnologies is diferent.
1 person found this helpful
A few things that are available in Java but not in AS3 :
- Abstract classes and methods
- Methods overload (including multiple constructors)
- Private constructors (for singletons for instance)
There's probably more, but this shows that the translation might not be as simple as it seems... Even if there are known workarounds for those lacks in AS3.
1 person found this helpful
Don't forget the class libraries are different..
I think the converter would be quite an undertaking. Adobe did make a C++ to Actionscript conversion, but I'm not sure it ever made prime time. If I remember they were able to run Quake without sound.
I also forgot that there are no such things as java's wrappers in AS3... No null Boolean for instance...
Thanks to you all.
In the meantime I read "Actionscript for Java developers"
and it seems like the two languages are not too far apart.
Of course there are differences, but we only need to consider those features which Java has and AS has not (like method overloading) and modify our Java sources to not use these. Since the goal is not to have a universal tool which translates _any_ kind of Java source to AS but only our specific code base I think it will be worth a small effort to test how far we get with a machine translation.
Yes, libraries may well be an issue - but again, I would have to see which (library) functions are actually used and how to replace them.
Thanks again and best regards
I think another of the potential stumbling blocks may be ActionScript's single-threaded, event-oriented nature. In Java, you can do whatever you want in a blocking manner. That's not the case in ActionScript--for some things (e.g., remote calls), you have no choice but to wait for a result event. I think this is actually a strength in ActionScript, but it's a different model and it could be hard to adapt if, e.g., you have RPC code all over the place (which one hopes you wouldn't anyway).
Good luck; it sounds like an exciting project.
fortunately this won't be an issue. Our Java program is "pure logic" - think of a list of cities (and their geographical coordinates), a list which of these cities to visit, and the question: What would be the optimal route?
Note: This is an example (because it's somewhat easier to present than what we are doing) - I am certainly not claiming that we are able to solve the 'Traveling Sales Man' problem.
Still, thanks for considering this aspect.
As for the 'exciting project': Here is hoping I won't get too much of it.