4 ms·
Is there pretty universal agreement on this? I've been around a while but still have the "meh, the words are interchangeable" view.
by dzdt 10y ago
Is there pretty universal agreement on this? I've been around a while but still have the "meh, the words are interchangeable" view.
- tempodox 10y agoFor a field that has so many elements of an exact science, I find it quite astonishing that so many people have such a lax attitude towards fundamental terms. But maybe that's just me.
- taco_emoji 10y agoPerhaps they're lax because distinguishing between parameters and arguments is hardly ever necessary? I can't even imagine a situation where I'd be confused by someone saying "argument" to refer to a "parameter", nor vice-versa.
- jerf 10y agoIn general, it's because different languages have sufficiently different semantics that you can not in general use a term from one language on another. You might think to yourself "Surely this parameter/argument thing is such a fundamental bit of terminology that it would apply to all languages?", to which I'd point out that there's an entire paradigm to which this distinction doesn't, strictly speaking, apply: Concatenative languages. Further, in Perl 5, functions and methods don't really have "parameters" at all. (Prototypes permit some optional, complicated, and generally not used stuff.) Also, in a language that permits equational reasoning it's not clear to me that the distinction has the same meaning, though I'll concede that's a more subtle point. I'm not aware of very many terms that can be strictly applied across all languages. Even something as innocuous as "int" has significantly different semantics in different languages (does it roll over or transparently upgrade to a BigInt?). You could call it a "machine int", perhaps, but that terminology isn't necessarily what I'd call "common use" even if most people will know what you mean.
- SilasX 10y agoThat would only be true for distinctions that make a technical difference. There are also distinctions that only exist for someone to flout[1] their superior knowledge of the technical terms. That is a social status issue, not a matter of precision. Best example of that case would be collective nouns: "oh gosh, you're supposed to say a "crash" of rhinos; you can't just say a "herd" or "bunch"! ~adjusts monocle~ Best example of "precision matters and can cause confusion" would be "literally" or "biweekly". It causes confusion when people can't rely on X-weekly meaning "X per week" or "every X weeks". You would be majestically justified in prodding people to stick to the same convention to avoid confusion. But there any scenarios where "signature vs invocation" actually matters to the point that you would do the wrong thing as a result of someone ignorantly flipping the terms? The only thing I can think of would be if someone said, with no other context, "change the parameters to fix the bug". [1] I know, it's "flaunt", not "flout". That's the point: they don't compete for the same semantic use cases, so they don't cause confusion.
- to3m 10y agoThe words are definitely not interchangeable, but you can probably say "parameter" most of the time, and people will figure out from context whether you mean a parameter or an argument. I'm a lot less certain this applies to "argument". (You could also say something like "parameter value"... VC++ calls parameters "formal parameters" and arguments "actual parameters", for example.)
- dzdt 10y agoI looked for a reference. http://stackoverflow.com/questions/156767/whats-the-difference-between-an-argument-and-a-parameter http://stackoverflow.com/questions/156767/whats-the-differen... "Summary" "The general consensus seems to be that it's OK to use these terms interchangeably in a team environment. Except perhaps when you're defining the precise terminology; then you can also use 'formal argument/parameter' and 'actual argument/parameter' to disambiguate."