JavaScript and ActionScript
JavaScript and ActionScript are brothers. They both come from ECMAScript. No wonder why I am so easy to understand the syntax of JavaScript. (Background: I started to learned Flash 5 years ago. Check one of my little flash example in my previous post.)They are different with C++. As my opensource professor David said, they are functional language. Function is the basics. Therefore, you can do something impossible in C++, and they are easier. For example,
for(var i=0;i<10;i++){ this["t"+i].i = i; this["t"+i] = function{ return this.i; } }it will create ten functions inside the global scope, let's say. The name of them are t0,t1,t2 and so on until t9. and they will return 0,1,2 and so on until 9 for each. It doesn't have any meaning in the code, but if I need to do it in C++, then I need the create ten functions and store the pointer of the funtions into an array. That is the reason why I think JavaScript and ActionScript are easier than C++.