Will be handy to use some syntactic sugar on smartphones, as:
1. ++
2. +=
3. [lat, lon] = split('{location,locationformat,decimal}', ','); //[a,b,c] = line.split() - as in Python language
4. "All variables is an object" concept
5. Define own function
6. Ternary operator r = a ? b : c
7. "?=" or "||=" operator, same as getValue()
8. arr = [1,2,3]
So, less symbols => more time to think about functionality, and clear, compact code.
Using JavaScript possibilities, we can write more clean code, by the way.
And v8 JS engine pretty fast: simple loop with some math operations works faster then C++ code with -O3 optimization.
// I used CoffeeScript on frontend and backend, it's so clear, but spaces instead of using brackets may be so annoying at smartphones. Who knows.
Or, Martin, is there some tricks to use Java functionality in action script?
Best regards.
Extra script operators
Moderator: Martin
Extra script operators
All systems nominal.
Re: Extra script operators
I agree that some syntactic sugar would be nice. Especially your points 1, 2, 5, 7, 8 are on my list of features under consideration.
You could try to execute some scripts with SL4A in the language of your choice but I'm not sure if this project is still maintained: https://github.com/damonkohler/sl4a
You can use scripts to directly call Java functions of the Android API but it's not very easy to get right and the function calls are hard to read since the scripting feature in Automagic does not allow to write real Java code. Check functions callJava* in action script by pressing the Function-button. Also use the Function-button to insert the functions since it will show a helper dialog to build the function call.
Regards,
Martin
You could try to execute some scripts with SL4A in the language of your choice but I'm not sure if this project is still maintained: https://github.com/damonkohler/sl4a
You can use scripts to directly call Java functions of the Android API but it's not very easy to get right and the function calls are hard to read since the scripting feature in Automagic does not allow to write real Java code. Check functions callJava* in action script by pressing the Function-button. Also use the Function-button to insert the functions since it will show a helper dialog to build the function call.
Regards,
Martin
Re: Extra script operators
Got it, Martin! Glad to hear!
Will wait for this features =)
Will wait for this features =)
All systems nominal.