• Industrial Automation Engineer (unregistered)

    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.

  • TS (unregistered)

    "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/

  • (nodebb) in reply to TS

    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 ?"...

  • (nodebb)

    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!

  • (nodebb) in reply to DocMonster

    but Foo(5) would actually throw an error!

    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.

  • Conradus (unregistered) in reply to Jaime

    "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.

  • (nodebb)

    Whenever I see the word 'moist', all I can think about is Dr. Horrible's Sing-Along Blog.

  • (nodebb)

    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

  • (nodebb)

    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.

  • (nodebb)

    Anyone who grew up programming in ZX BASIC would not be surprised at not needing parentheses around (most) function arguments.

Leave a comment on “Unnavigable”

Log In or post as a guest

Replying to comment #:

« Return to Article