|
|
|
|
|
by ivanca
4320 days ago
|
|
This is the worst mistake Unity made, inside unity it call those scripts "JavaScript" and it even uses the .js extension but is not a superset of JavaScript, is not a subset of JavaScript, is an abomination that just opens new questions and errors and calling it JavaScript doesn't help one little bit. If you think I'm exaggerating just as a quick overview, there are no object literals (e.g. {value: true}), there is no array literals (e.g. [1]), you have to use new Array() which is deprecated in real JavaScript, they also implement some of the JS native functions but forget others making everything more confusing (for example parseInt exists but btoa doesn't), colons don't do anything they do in JavaScript, nothing, they are use to specify type, because UnityScript is a semi-typed language. Functions are not first class citizens and is not prototype based; at the end is just a mask for C# and that would be okay if it wasn't for them calling it "JavaScript" or even gasps "Unity-Flavored JavaScript" |
|