Content deleted Content added
Undid revision 1266038578 by 2600:1005:B003:9156:0:0:66DA:3D01 (talk) huh? |
Stevebroshar (talk | contribs) →String is not a data type: new section |
||
Line 160:
WRT "In computer programming, a string is traditionally a sequence of characters..." What does 'traditionally' imply? What does string mean in a non-traditional sense? How is traditionality relevant? IMO it is a sequence of chars (period or full-stop as they say across the pond). [[User:Stevebroshar|Stevebroshar]] ([[User talk:Stevebroshar|talk]]) 14:03, 20 December 2024 (UTC)
== String is not a data type ==
WRT "A string is generally considered as a data type"
No. String is a higher level concept than [[data type]]. Many languages have a string data type (or multiple). But there's significant difference between string data and a type for string data.
To illustrate the difference between string data and data type, consider C. It has no string type. The most commonly used data type for string data is char*; pointer to char. That is not a string type, yet it is used for string data. Note that char* can be used for non-string data; a pointer to a single char storage, for example. FWIW, the [[data structure]] is called [[null-terminated string]] or c-string.
What is this article about? Is it about the concept of string in general (string data)? Or about particular data types in particular languages and contexts? I assume the intention is both. But, the two should not be conflated. It should say that a string is sequence of characters and that many languages define a type for string data. It should not say that string ''is'' a data type.
TBO this article provides little value and should be deleted, but I'm sure folks don't like that idea. But, if it's going to exist, it shouldn't misrepresent the world. [[User:Stevebroshar|Stevebroshar]] ([[User talk:Stevebroshar|talk]]) 13:19, 10 May 2025 (UTC)
|