- Feature Articles
- CodeSOD
- Error'd
-
Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
I wish my (inherited) code was that well structured and readable. At least one has a chance of understanding the code, even if it's an unmitigated disaster to maintain. Sometimes you just have to make do.
Admin
"Foo 5 and Foo(5) are the same thing." I think you'll find it's a bit more complicated than that: https://ericlippert.com/2003/09/15/what-do-you-mean-cannot-use-parentheses/
Edit Admin
I thought one bit of that post was a little weird, treating "what do you mean 'cannot use parentheses'" as if the person was asking "what do you mean by these words" rather than "'cannot use parentheses' ? WTF ?"...
Edit Admin
If I recall wasn't it you COULDN'T use parenthesis at all unless you used the "Call" keyword? E.g., Call Foo(5) but Foo(5) would actually throw an error!
Edit Admin
Foo(5) doesn't throw an error because the argument list, which is not surrounded in parentheses, is "(5)". It matters when it's a variable rather than a constant because it causes the variable to be passed by value since the argument is an expression containing the variable rather than just the variable.
Admin
"Foo(5) doesn't throw an error because the argument list, which is not surrounded in parentheses, is "(5)". It matters when it's a variable rather than a constant because it causes the variable to be passed by value since the argument is an expression containing the variable rather than just the variable."
My head hurts.
Edit Admin
Whenever I see the word 'moist', all I can think about is Dr. Horrible's Sing-Along Blog.
Edit Admin
Ah, Remy. A perfect opportunity to use this phrase and you whiff. Pity.
https://english.stackexchange.com/questions/235704/origin-of-the-saying-all-wet
Edit Admin
MATLAB does that foo 5 foo(5) thing, and it's worse when you want to feed either a string "bar" or a variable named 'bar." The command-line parser coerces differently for foo(bar) vs foo bar and that really sucks.
Edit Admin
Anyone who grew up programming in ZX BASIC would not be surprised at not needing parentheses around (most) function arguments.