- 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/
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 ?"...
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!
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.
Admin
Whenever I see the word 'moist', all I can think about is Dr. Horrible's Sing-Along Blog.
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
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.
Admin
Anyone who grew up programming in ZX BASIC would not be surprised at not needing parentheses around (most) function arguments.
Admin
I'm enjoying the more sophisticated choices, like the
<b></b><i></i>
prefix to any active list elements, or the subtle variance in white space separatinghref
andtitle
attributes varying on an individual basis. — There's so much in this code for those who know to look and how to enjoy the vistas. A picturesque source, indeed.Admin
Write Every Time
Admin
Write All Time...
Admin
Believe it or not, that makes complete sense to me.
The "problem" is rooted in VB treating statements and expressions differently, which people who grew up on the various home computer BASICs will not find unfamiliar. Visual BASIC came about in the dying days of micro-computer BASIC, so it was not an unreasonable feature to have. But most modern languages to treat everything as an expression so people expect identical semantics.
Admin
I'm still maintaining a Classic ASP codebase. Even worse: it started out as a Microsoft Frontpage application.