Editing 2309: X
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone.
Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 17: | Line 17: | ||
A {{w|Variable (computer science)|variable}} is a piece of data (such as an integer or a string of text) whose value can change over the run of a program. Variables are identified by name and can usually be named any string of alphanumeric characters. To make code easier for a human to follow, variables are usually given a name that indicates what the variable is for; for example, a variable counting how many seconds have passed since the program was launched might be called '''elapsedTime'''. | A {{w|Variable (computer science)|variable}} is a piece of data (such as an integer or a string of text) whose value can change over the run of a program. Variables are identified by name and can usually be named any string of alphanumeric characters. To make code easier for a human to follow, variables are usually given a name that indicates what the variable is for; for example, a variable counting how many seconds have passed since the program was launched might be called '''elapsedTime'''. | ||
β | + | Some programmers, particularly if they are working under time pressure, may give their variables nondescript names such as '''x'''. This is considered bad coding practice, because anyone reading the code will not immediately understand what the variable does unless they are familiar with it. Even the original programmer may come back to it and find that they have forgotten what the variable was for. | |
Here, Cueball is developing a language where ''all'' variables are named '''X''' - and the only way to differentiate different Xs is to write it in different typefaces. Needless to say, this is a terrible idea. The language would be a nightmare to program in, as all of the variables would look very similar unless careful attention is being paid, and there would be little to no way to determine what each one does, since font names are typically not very descriptive. Additionally, the fact that some fonts look similar (such as Arial and Helvetica) would require the programmer to have an intricate knowledge of different fonts and how to distinguish them from only one letter. | Here, Cueball is developing a language where ''all'' variables are named '''X''' - and the only way to differentiate different Xs is to write it in different typefaces. Needless to say, this is a terrible idea. The language would be a nightmare to program in, as all of the variables would look very similar unless careful attention is being paid, and there would be little to no way to determine what each one does, since font names are typically not very descriptive. Additionally, the fact that some fonts look similar (such as Arial and Helvetica) would require the programmer to have an intricate knowledge of different fonts and how to distinguish them from only one letter. |