Talk:String (computer science)

From Wikipedia, the free encyclopedia

This article is within the scope of WikiProject Computer science, which aims to create a comprehensive computer science reference for Wikipedia. Visit the project page for more information and to join in on related discussions.
Start rated as start-Class on the assessment scale
Mid rated as Mid-importance on the assessment scale

This is the talk page for discussing improvements to the String (computer science) article.

Article policies

Contents

[edit] Other related topics

[edit] Anyone want to tackle

-

[edit] string (small version of rope),

string (general chain of various things), string (music), etc. - not just the computer version.

Also, string theory of cosmology/physics.

[edit] Computing theory

Also, I think the usage in computing theory could be expanded in its own paragraph: one starts with a finite alphabet, then considers all finite sequences consisting of letters from that alphabet (including the empty string) and defines concatentation of strings. The set of string with concatentation is then a monoid.

I won't try to expand the second paragraph; I'm inclined to leave that to the computation article, or to whoever can concisely expand it without detracting from the rest of the page. --User:Hornlo

[edit] Other meaninngs

I think something definitely needs to be added about the other meanings of string. Ukulele is already linked to this page, which is somewhat confusing. Although, I'm not sure how much content can actually be provided for the other meanings. Maybe this article should be moved to String (computer science) or something, and this page be turned into a disambiguation page. B4hand

I propose renaming this article to Character string (computer science). Comments? - Bevo 17:03, 13 Jun 2004 (UTC)

I oppose. A string doesn't need to be literal string in general. -- Taku 18:44, Sep 25, 2004 (UTC)

[edit] Lexicographical order

The lexicographical order on Σ* is not a well-ordering (for example, what is the least element in a*b?), but only a total order. fudo 13:53, 2 August 2005 (UTC)

The least element of a*b is b. The lexicographical order on Σ* is indeed a well-ordering. --Pexatus 00:22, 19 March 2006 (UTC)
No. There is no least element of a*b if you use the alphabetical ordering a < b. Assume there is some least element m; this means that m = akb for some non-negative integer k. Note that n = ak + 1b is also in a*b. n agrees m in k positions, but the k + 1th position of n is less than the k + 1th position of m, so n < m, which contradicts the assumption that there exists a least element of a*b. Therefore, there is no least element of a*b. --Bkkbrad 16:28, 13 September 2006 (UTC)

[edit] strings, not characters

There are lots of references to this page throughout wikipedia for a "string" that is not a set of characters; a string of bits or bytes, for example. I think it is important that the article be cleaned-up to make it clear that "character strings" are the most common uses of the type, but the term might apply to vectors of data not representable by a string in a particular language. I've made a couple of edits in this direction, but I think some more effort needs to go into the issue. -- Mikeblas 22:39, 29 January 2006 (UTC)

I agree, but you probably ought not to take it too far. "Character string" is usually implied, and the article shouldn't give the impression that "string" on its own is incorrect. For the most part, I think your edits were fine, although perhaps you could revert the edits to the string oriented languages section. More effort doesn't need to go into the issue, as that would just confuse the article. --StuartBrady 22:59, 29 January 2006 (UTC)
I was confused by this too. "String" always refers to a string of characters. Vectors of other things are lists, arrays, vectors, ... I'm curious as to what language it is where the word "string" is used in reference to lists of objects. Richard W.M. Jones 09:04, 1 May 2006 (UTC)
Yes. And keep in mind that WP article titles generally reflect the most common usage for a given term (unless it needs its own disambiguation page). In computer science, "string" most common refers to a string of characters. Other not-so-common meanings (e.g., bitstring) can be linked to in the "See also" section. — Loadmaster 18:35, 1 May 2007 (UTC)

[edit] Null and NUL

We should decide on just one spelling and capitalization of null. I vote for two L's.24.186.138.188 02:03, 2 May 2006 (UTC)

"Null" generally refers to the "null character" (or a "null pointer"). "NUL" (all caps) is the mnemonic name (ASCII, EBCDIC, Unicode, etc.) of the "null character" code. — Loadmaster 18:35, 1 May 2007 (UTC)

[edit] Origin of the Term ?

Anyone know the history behind using the term "string" to mean a sequence of characters? I mean its not like a series of characters looks much like a ball of string... I assume it's origins are as a mathematical term, but it would be interesting to know how it came to such common use in computing.

Presumably it comes from the rather obvious expression "a string of characters" (as in "these go some characters stringing by"), equivalent to "a string of pearls" or "a sequence of characters" or other similar phrases. — Loadmaster (talk) 16:27, 9 February 2008 (UTC)