![]() | Disambiguation | |||
|
I made some changes to the "Names of variables" section:
-- Eelis 01:17, 2005 May 23 (UTC)
The term "variable" is also used in scientific experimentation. I see nothing speaking about an experimental variable here. My guess is this is *by far* the most commonly used meaning of the noun in the non-math non-computer general population. 69.40.254.72 ( talk) 15:08, 6 November 2010 (UTC)
I think the text in the "Computer programming" section of this revision is much more clear and readable than the current text. It is far from perfect but the current text has a lot of bad English and ambiguous sentences, and uses erratic terms, such as "life-time" in place of the standard term "extent". I think it is a better place to work from than the current text. I'd revert -- but I wrote much of the old text and am certainly biased. Anyone else watching? -- FOo 05:30, 1 Aug 2004 (UTC)
I have heard both terms lifetime and extent used for variables. I don't think one is particularly more clear than the other, but perhaps they both should be mentioned the first time. I may try to work on the phrasing there, but the english in that whole paragraph is a mess. ("life-time" is a mispelling IMHO.) Also, I think scope should be described in terms of binding, as scope and extent are only related for the special case of local variables, and are not related when refering to static variables, global variables, dynamic variables, class variables, etc... This paragraph is really just a disorganized jumble of concepts. The concepts of scope, lifetime, binding, gc'ing, etc., all need to be defined each in their own paragraph before you try to relate them and mix them together. I think it is very helpful, however, to include (limited) examples of languages that use each technique. The concept of Garbage collection is extremley important. C and assembly programmers will not survive until they understand these things and how they relate to the lifetime of a variable, which may exceed its scope or may be exceeded by its scope. (I.e., passing a reference to a variable that is about to die is a bug. Allowing a reference to go out of scope without freeing its target (and thus ending its lifetime) is a different bug.) Does extent apply to a length of (run)time, a length of code, or both? This needs to be clarified. -- ssd 03:31, 27 Aug 2004 (UTC)
I think there needs to be a more clearly defined seperation between variables in CS and variables in mathematics - there is a quite distinct treatment of the two. Perhaps the section for CS can look something like Operator - cover a short paragraph or two on the important topics and leave the important treatment to the respective articles? Dysprosia 11:58, 31 Aug 2004 (UTC)
Hello. I wonder about the reference to Help:Variable in this article. I'm not in favor of self-references within WP but I can see that someone might easily come here looking for special wiki variables. Suggestions? Regards & happy editing, Wile E. Heresiarch 15:57, 25 Jan 2005 (UTC)
I merged the two versions of the Computer Science section. Hopefully I have included everything and not offended anybody. The Rod 00:31, 28 December 2005 (UTC)
Class variable redirects here, but the article never defines what it means. Someone feel up to integrating a description? Night Gyr 18:47, 2 March 2006 (UTC)
The first part of the article is clear in its adoption of a syntactic perspective on variables:
"a variable is a _symbol_ denoting a quantity..."
The first reference to Computer Science is also consistent with the syntactic view
"in computer science, it _represents_ a place where a quantity can be stored"
However, in the section "Computer programming", the perspective changes and variables becomes things which are denoted rather than denotations:
"a variable can be thought of as a place to store a value"
so, a variable _represented_ a place and now it _is_ a place. The shift in perspective continues with:
"More precisely, a variable binds (associates) a name (sometimes called an identifier) with the location; a value in turn is stored as a data object in that location so that the object can be accessed later via the variable, much like referring to someone by name"
to have a name, a variable must be in the semantics not the syntax.
So where do variables belong? to the syntax or to the semantics?
Both perspective are possible and defendable, but a single one should be consistently adopted to avoid confusion.
Thanks for the otherwise clear contribution.
fabio
(fabio.simeoni@cis.strath.ac.uk) —The preceding unsigned comment was added by 80.41.247.128 ( talk • contribs) 2006-03-08 09:56:18 (UTC)
>>> cow = "I Go Moo" >>> globals()["cow"] 'I Go Moo'
Quote:
It doesn't represent an unknown number, x = 4 Jackliddle 14:58, 30 May 2006 (UTC) I think what they were trying to prove is its not a given fact you have to use your brain to figure out x. I.e. you would have to figure it out 18 divided by 2 = 9. Hence, y=9 Ashwariak 18:49, 23 April 2007 (UTC)
As it stands, the article is structured somewhat strangely. There are four paragraphs talking about the term in different fields, then there is a moderately long discussion of the term in applied statistics, a throwaway section on the term in basic mathematics, and then the bulk of the article is about variables in computer science, getting very detailed and technical. If I have time, I might write a section or a part of a section on variables in physical science, but the contents of that section (whether written by me or someone else) will not have much to do with what we've already got on variables in computer science. I think we should split the page into "Variable (applied mathematics and physical science)" and "Variable (computer science)", and possibly also "Variable (statistics)".-- Atemperman 20:03, 21 August 2006 (UTC)
uh...what is the history of the unknown variable?
The perl example already has two variables ($sName and $sGreet), so there is no need to add a third ($v). The print function is included in the example strictly for display purposes only. Technically it is not relevant to interpolation, at least not in Perl. I will re-edit to make it more clear. Thanks! dr.ef.tymac 14:03, 10 November 2006 (UTC)
Commented out a section that implied variable identifier is the only way to access value (object) in memory. Unless someone wishes to clarify, the content will be removed. Thanks! dr.ef.tymac 17:03, 10 December 2006 (UTC)
you need to rap the variable sentince together to give a complete thought
This article mention of variable extent, and tries to differentiate it from scope, but I think it needs its own section, which at a bare minimum should enumerate the different kinds of extents and their labels in different langauges (i.e., global, static, heap, local, stack, whatever) and how it interacts with the data segment and memory segmentation. -- ssd 17:41, 9 March 2007 (UTC)
Very confused, any insights? —Preceding unsigned comment added by 75.71.249.209 ( talk) 21:20, 24 November 2007 (UTC)
I am not a phonetician, but the IPA transcription doesn't seem quite right to me. It seems to be that the first syllable, transcribed as /vær/, as written, would be pronounced with the vowel of the first syllable of carry, whereas in my experience, it is pronounced like the word care, so I think it should be transcribed more like /vɛər/. I know that accents with the marry-Mary-merry merger will pronounce them the same, but they are distinct for many speakers and the transcription should reflect this. Furby100 07:38, 1 December 2007 (UTC)
The article speaks of entity. What is an entity (computer science) (currently red link)? Thanks! -- Abdull ( talk) 12:07, 9 February 2008 (UTC)
Would it be okay if I changed the Lisp code to C++, seeing as C++ is typically a more widely recognized programming language then Lisp? ShawnStovall ( talk) 07:15, 9 April 2008 (UTC)
According to a link on "Measurement theory" at the bottom of the level of measurement entry, "Measurement level has nothing to do with discrete vs. continuous variables." In light of this, I removed the sentence (in the "In applied statistics" section) that said "This [the distinction between discrete and continuous variables] is referred to as the level of measurement."
I also added the "level of measurement" link to the "See also:" links at the bottom of the section.
2rock ( talk) 11:29, 17 May 2008 (UTC)
The "Computer programming" section was badly written and had some nonsensical or too specific assertions that weren't true for all paradigms. I've tried to generalize and clean it, if you find I've removed something important feel free to discuss. Diego ( talk) 12:01, 24 October 2008 (UTC)
This feels wrong to me (and I studied computer science). I don't think we call all such values constants; we reserve the term for identifiers that denote a fixed and given value. A final variable is not a constant, and neither is a variable in functional programming! The person who provided the definition may have been confused by C/C++'s çonst keyword, but that keyword doesn't define constants even in C/C++ jargon, if I'm not mistaken. Rp ( talk) 01:38, 31 December 2008 (UTC)
You are correct. For example, in the general second degree polynomial ax^2 + bx + c, a, b, and c are constants which can be assigned any (fixed) values, but those values vary from one problem to another. Rick Norwood ( talk) 14:27, 31 December 2008 (UTC)
Why don't you fix that one. I'm a mathematician, not a computer scientist. Rick Norwood ( talk) 14:21, 2 January 2009 (UTC)
Should we mention Finagle's variable constant, which equals the right answer divided by your answer? Rick Norwood ( talk) 14:38, 6 January 2009 (UTC)
On a related note, the classification of a constant as a particular type of variable pains my sense of terminology. I've always seen them used in opposition: an identifier may be a constant, or a variable, or perhaps something else . Rp ( talk) 13:51, 9 February 2009 (UTC)
I've been bold and added a lot of unsourced (but I'm quite sure it's not incorrect) information about mathematical variable naming conventions. I hope I haven't gone too far. Leon math ( talk) 23:02, 4 January 2009 (UTC)
I've renamed it to "Name Conventions". I don't see the need for there gerund.
I think the stats should be separate article.
SimonTrew ( talk) 01:35, 26 February 2009 (UTC)
I want to propose to fork this article in two, separating the details for variables in maths to those in computer science. The subtleties are too much for all the exceptions to make sense in a single article. There could be a brief section explaining what both concepts have in common, but the general usage is too different in both areas for them to be explained in a single page. Diego ( talk) 12:31, 5 January 2009 (UTC)
This article should be an overview, with sections. For example, ==computer science== {main: variables in computer science}
Rick Norwood ( talk) 15:25, 5 January 2009 (UTC)
I prefer to keep it as a single article because there are numerous connections and contrasts between the senses of variables in different disciplines. Somebody that wants to read about "variables" in general is likely to want to know about the connections and differences. That said, I admit that the article is not entirely coherent right now. I intend to work on it.
Reddyuday ( talk) 11:53, 2 March 2009 (UTC)
I browsed the article for the first time today. I think I agree with Diego above – the article should be split. The similarities between variables in mathematics and computer science are mostly curiosities. They are not very interesting to someone who reads the article from a maths or cs point of view, and I suspect comparing them back and forth would just frustrate such a reader. I think the reader who 'wants to read about "variables" in general' is rare. JöG ( talk) 19:50, 4 April 2009 (UTC)
Split executed. See Variable (programming) and Variable (mathematics) -- Cybercobra ( talk) 01:34, 5 April 2009 (UTC)
![]() | Disambiguation | |||
|
I made some changes to the "Names of variables" section:
-- Eelis 01:17, 2005 May 23 (UTC)
The term "variable" is also used in scientific experimentation. I see nothing speaking about an experimental variable here. My guess is this is *by far* the most commonly used meaning of the noun in the non-math non-computer general population. 69.40.254.72 ( talk) 15:08, 6 November 2010 (UTC)
I think the text in the "Computer programming" section of this revision is much more clear and readable than the current text. It is far from perfect but the current text has a lot of bad English and ambiguous sentences, and uses erratic terms, such as "life-time" in place of the standard term "extent". I think it is a better place to work from than the current text. I'd revert -- but I wrote much of the old text and am certainly biased. Anyone else watching? -- FOo 05:30, 1 Aug 2004 (UTC)
I have heard both terms lifetime and extent used for variables. I don't think one is particularly more clear than the other, but perhaps they both should be mentioned the first time. I may try to work on the phrasing there, but the english in that whole paragraph is a mess. ("life-time" is a mispelling IMHO.) Also, I think scope should be described in terms of binding, as scope and extent are only related for the special case of local variables, and are not related when refering to static variables, global variables, dynamic variables, class variables, etc... This paragraph is really just a disorganized jumble of concepts. The concepts of scope, lifetime, binding, gc'ing, etc., all need to be defined each in their own paragraph before you try to relate them and mix them together. I think it is very helpful, however, to include (limited) examples of languages that use each technique. The concept of Garbage collection is extremley important. C and assembly programmers will not survive until they understand these things and how they relate to the lifetime of a variable, which may exceed its scope or may be exceeded by its scope. (I.e., passing a reference to a variable that is about to die is a bug. Allowing a reference to go out of scope without freeing its target (and thus ending its lifetime) is a different bug.) Does extent apply to a length of (run)time, a length of code, or both? This needs to be clarified. -- ssd 03:31, 27 Aug 2004 (UTC)
I think there needs to be a more clearly defined seperation between variables in CS and variables in mathematics - there is a quite distinct treatment of the two. Perhaps the section for CS can look something like Operator - cover a short paragraph or two on the important topics and leave the important treatment to the respective articles? Dysprosia 11:58, 31 Aug 2004 (UTC)
Hello. I wonder about the reference to Help:Variable in this article. I'm not in favor of self-references within WP but I can see that someone might easily come here looking for special wiki variables. Suggestions? Regards & happy editing, Wile E. Heresiarch 15:57, 25 Jan 2005 (UTC)
I merged the two versions of the Computer Science section. Hopefully I have included everything and not offended anybody. The Rod 00:31, 28 December 2005 (UTC)
Class variable redirects here, but the article never defines what it means. Someone feel up to integrating a description? Night Gyr 18:47, 2 March 2006 (UTC)
The first part of the article is clear in its adoption of a syntactic perspective on variables:
"a variable is a _symbol_ denoting a quantity..."
The first reference to Computer Science is also consistent with the syntactic view
"in computer science, it _represents_ a place where a quantity can be stored"
However, in the section "Computer programming", the perspective changes and variables becomes things which are denoted rather than denotations:
"a variable can be thought of as a place to store a value"
so, a variable _represented_ a place and now it _is_ a place. The shift in perspective continues with:
"More precisely, a variable binds (associates) a name (sometimes called an identifier) with the location; a value in turn is stored as a data object in that location so that the object can be accessed later via the variable, much like referring to someone by name"
to have a name, a variable must be in the semantics not the syntax.
So where do variables belong? to the syntax or to the semantics?
Both perspective are possible and defendable, but a single one should be consistently adopted to avoid confusion.
Thanks for the otherwise clear contribution.
fabio
(fabio.simeoni@cis.strath.ac.uk) —The preceding unsigned comment was added by 80.41.247.128 ( talk • contribs) 2006-03-08 09:56:18 (UTC)
>>> cow = "I Go Moo" >>> globals()["cow"] 'I Go Moo'
Quote:
It doesn't represent an unknown number, x = 4 Jackliddle 14:58, 30 May 2006 (UTC) I think what they were trying to prove is its not a given fact you have to use your brain to figure out x. I.e. you would have to figure it out 18 divided by 2 = 9. Hence, y=9 Ashwariak 18:49, 23 April 2007 (UTC)
As it stands, the article is structured somewhat strangely. There are four paragraphs talking about the term in different fields, then there is a moderately long discussion of the term in applied statistics, a throwaway section on the term in basic mathematics, and then the bulk of the article is about variables in computer science, getting very detailed and technical. If I have time, I might write a section or a part of a section on variables in physical science, but the contents of that section (whether written by me or someone else) will not have much to do with what we've already got on variables in computer science. I think we should split the page into "Variable (applied mathematics and physical science)" and "Variable (computer science)", and possibly also "Variable (statistics)".-- Atemperman 20:03, 21 August 2006 (UTC)
uh...what is the history of the unknown variable?
The perl example already has two variables ($sName and $sGreet), so there is no need to add a third ($v). The print function is included in the example strictly for display purposes only. Technically it is not relevant to interpolation, at least not in Perl. I will re-edit to make it more clear. Thanks! dr.ef.tymac 14:03, 10 November 2006 (UTC)
Commented out a section that implied variable identifier is the only way to access value (object) in memory. Unless someone wishes to clarify, the content will be removed. Thanks! dr.ef.tymac 17:03, 10 December 2006 (UTC)
you need to rap the variable sentince together to give a complete thought
This article mention of variable extent, and tries to differentiate it from scope, but I think it needs its own section, which at a bare minimum should enumerate the different kinds of extents and their labels in different langauges (i.e., global, static, heap, local, stack, whatever) and how it interacts with the data segment and memory segmentation. -- ssd 17:41, 9 March 2007 (UTC)
Very confused, any insights? —Preceding unsigned comment added by 75.71.249.209 ( talk) 21:20, 24 November 2007 (UTC)
I am not a phonetician, but the IPA transcription doesn't seem quite right to me. It seems to be that the first syllable, transcribed as /vær/, as written, would be pronounced with the vowel of the first syllable of carry, whereas in my experience, it is pronounced like the word care, so I think it should be transcribed more like /vɛər/. I know that accents with the marry-Mary-merry merger will pronounce them the same, but they are distinct for many speakers and the transcription should reflect this. Furby100 07:38, 1 December 2007 (UTC)
The article speaks of entity. What is an entity (computer science) (currently red link)? Thanks! -- Abdull ( talk) 12:07, 9 February 2008 (UTC)
Would it be okay if I changed the Lisp code to C++, seeing as C++ is typically a more widely recognized programming language then Lisp? ShawnStovall ( talk) 07:15, 9 April 2008 (UTC)
According to a link on "Measurement theory" at the bottom of the level of measurement entry, "Measurement level has nothing to do with discrete vs. continuous variables." In light of this, I removed the sentence (in the "In applied statistics" section) that said "This [the distinction between discrete and continuous variables] is referred to as the level of measurement."
I also added the "level of measurement" link to the "See also:" links at the bottom of the section.
2rock ( talk) 11:29, 17 May 2008 (UTC)
The "Computer programming" section was badly written and had some nonsensical or too specific assertions that weren't true for all paradigms. I've tried to generalize and clean it, if you find I've removed something important feel free to discuss. Diego ( talk) 12:01, 24 October 2008 (UTC)
This feels wrong to me (and I studied computer science). I don't think we call all such values constants; we reserve the term for identifiers that denote a fixed and given value. A final variable is not a constant, and neither is a variable in functional programming! The person who provided the definition may have been confused by C/C++'s çonst keyword, but that keyword doesn't define constants even in C/C++ jargon, if I'm not mistaken. Rp ( talk) 01:38, 31 December 2008 (UTC)
You are correct. For example, in the general second degree polynomial ax^2 + bx + c, a, b, and c are constants which can be assigned any (fixed) values, but those values vary from one problem to another. Rick Norwood ( talk) 14:27, 31 December 2008 (UTC)
Why don't you fix that one. I'm a mathematician, not a computer scientist. Rick Norwood ( talk) 14:21, 2 January 2009 (UTC)
Should we mention Finagle's variable constant, which equals the right answer divided by your answer? Rick Norwood ( talk) 14:38, 6 January 2009 (UTC)
On a related note, the classification of a constant as a particular type of variable pains my sense of terminology. I've always seen them used in opposition: an identifier may be a constant, or a variable, or perhaps something else . Rp ( talk) 13:51, 9 February 2009 (UTC)
I've been bold and added a lot of unsourced (but I'm quite sure it's not incorrect) information about mathematical variable naming conventions. I hope I haven't gone too far. Leon math ( talk) 23:02, 4 January 2009 (UTC)
I've renamed it to "Name Conventions". I don't see the need for there gerund.
I think the stats should be separate article.
SimonTrew ( talk) 01:35, 26 February 2009 (UTC)
I want to propose to fork this article in two, separating the details for variables in maths to those in computer science. The subtleties are too much for all the exceptions to make sense in a single article. There could be a brief section explaining what both concepts have in common, but the general usage is too different in both areas for them to be explained in a single page. Diego ( talk) 12:31, 5 January 2009 (UTC)
This article should be an overview, with sections. For example, ==computer science== {main: variables in computer science}
Rick Norwood ( talk) 15:25, 5 January 2009 (UTC)
I prefer to keep it as a single article because there are numerous connections and contrasts between the senses of variables in different disciplines. Somebody that wants to read about "variables" in general is likely to want to know about the connections and differences. That said, I admit that the article is not entirely coherent right now. I intend to work on it.
Reddyuday ( talk) 11:53, 2 March 2009 (UTC)
I browsed the article for the first time today. I think I agree with Diego above – the article should be split. The similarities between variables in mathematics and computer science are mostly curiosities. They are not very interesting to someone who reads the article from a maths or cs point of view, and I suspect comparing them back and forth would just frustrate such a reader. I think the reader who 'wants to read about "variables" in general' is rare. JöG ( talk) 19:50, 4 April 2009 (UTC)
Split executed. See Variable (programming) and Variable (mathematics) -- Cybercobra ( talk) 01:34, 5 April 2009 (UTC)