I am TRWTF - compiler can't guess the keyword
-
I never claimed otherwise.
-
Why does a method named EnableControls disable controls?
If you find out, can you tell the dev of an app I'm rebuilding in C# from VBA in Access '97? I would like to know this too.
-
Apart from JavaScript. Because JavaScript is special like that.
Actually now that's no longer the case:
{ let blockScoped = 'nirvana' console.log(`we have block-scoped ${blockScoped}`) } // Accessing blockScoped here results in a ReferenceError.
Edit by a long way ... I should go to bed.
-
Stared at this for 10 minutes this morning, trying to figure out why the controls were always showing disabled even though the database was connecting
The funny thing is that the religious among programmers would suggest the following syntax, which doesn't actually prevent this from happening anyway.
private void PoForm_Shown(object sender, EventArgs e) { if (db.ConnectToDatabase()) { EnableControls(true); lblInfo.Text = "Select PO"; } { lblInfo.Text = db.Error; EnableControls(false); } }
-
Lack of scopes is also my biggest problem with Python. I end up doing many functions because of that, it is leaky.
-
groovy fails with that
http://groovyconsole.appspot.com/script/5174790943932416
Ambiguous expression could be a parameterless closure expression, an isolated open code block, or it may continue a previous statement;
solution: Add an explicit parameter list, e.g. {it -> ...}, or force it to be treated as an open block by giving it a label, e.g. L:{...}, and also either remove the previous newline, or add an explicit semicolon ';'It's annoying in Gradle, which a) forbids labels and b) fucks around with scoping by design.
-
Lack of scopes is also my biggest problem with Python. I end up doing many functions because of that, it is leaky.
They're not part of stock Tcl. I've got code that implements them.
-
The funny thing is that the religious among programmers would suggest the following syntax, which doesn't actually prevent this from happening anyway.