Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Is Lua a good scripting language?

Name: Anonymous 2011-07-25 14:41

Is it?

Name: Anonymous 2011-07-25 22:22

>>22
var does affect scope. Observe (from the Chromium JS console):


var a = 42; (function() {var a = 66;})(); a;
  42
var a = 42; (function() {a = 66;})(); a;
  66
(function() {var b = 99;})(); b;
  ReferenceError: b is not defined
(function() {b = 99;})(); b;
  99


So essentially, every variable in your program is global. It's wasteful and can lead to bugs, especially if those variables contain DOM elements.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List