Why String?
-
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
Because you could never tell how long it is. Cheers ;P Peter
Software rusts. Simon Stephenson, ca 1994.
-
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
Because even the best C programmers end up hanging themselves with them at some point in time.
-
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
AspDotNetDev wrote:
they are strings/sequences of digits
No they're not -- unless you use ToString.
AspDotNetDev wrote:
Any theories as to why "string" prevailed?
Because in BASIC they are designated by a $ which is a lot like an S and they who use BASIC are hard to teach.
-
I think it's an unconscious desire to return to the good old days of BASIC where a variable was identified as containing text characters by using the suffix $. The art of programming has never recovered from the damage done by constructs like, >10 DATA "MY", "TEXT", "DATA" >20 READ A$, B$, C$ >30 LPRINT A$, B$, C$ >50 GOTO 10 >9999 END >RUN Back in the day, A$ was even pronounced, "A-string." :-D
Will Rogers never met me.
Oh my eyes.....noooooooooooo
VS2010/Atmel Studio 6.0 ToDo Manager Extension
Version 3.0 now available. There is no place like 127.0.0.1 -
Sounds like quite the yarn. :)
Hope I pulled the wool over your eyes ;)
MVVM# - See how I did MVVM my way ___________________________________________ Man, you're a god. - walterhevedeich 26/05/2011 .\\axxx (That's an 'M')
-
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
My first acquaintance with "strings" was in the pre-computer days (early eighties, in India - there were no or very very few computers then; the nearest one was a Casio calculator), when we did physics experiments with standing waves or stationary waves. We had to find nodes, also called stationary points. So, when I had to first program with strings using MFC, it took some time to unlearn the wave part, and get used to strings within quotes.
-
I think it's an unconscious desire to return to the good old days of BASIC where a variable was identified as containing text characters by using the suffix $. The art of programming has never recovered from the damage done by constructs like, >10 DATA "MY", "TEXT", "DATA" >20 READ A$, B$, C$ >30 LPRINT A$, B$, C$ >50 GOTO 10 >9999 END >RUN Back in the day, A$ was even pronounced, "A-string." :-D
Will Rogers never met me.
It's like inverted PHP! My eyes!! :)
- S 50 cups of coffee and you know it's on! Code, follow, or get out of the way.
-
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
It is according to the Grand Unified Theory of Programming, a string can store all the values of any plain old data(POD)! Also known as the String Theory of programming. This is why text type is known as string!
-
Oh my eyes.....noooooooooooo
VS2010/Atmel Studio 6.0 ToDo Manager Extension
Version 3.0 now available. There is no place like 127.0.0.1 -
I think it's an unconscious desire to return to the good old days of BASIC where a variable was identified as containing text characters by using the suffix $. The art of programming has never recovered from the damage done by constructs like, >10 DATA "MY", "TEXT", "DATA" >20 READ A$, B$, C$ >30 LPRINT A$, B$, C$ >50 GOTO 10 >9999 END >RUN Back in the day, A$ was even pronounced, "A-string." :-D
Will Rogers never met me.
I feel toddler bliss again!
FILETIME to time_t
| FoldWithUs! | sighist | WhoIncludes - Analyzing C++ include file hierarchy -
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
The first computers used quipus[^] as storage media.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
-
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
-
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
Because by the time you've got through:
Dim A as String
A = "M"
A = A & "a"
A = A & "r"
A = A & "i"
A = A & "j"
A = A & "u"
A = A & "a"
A = A & "n"
A = A & "a"You're strung out.
I wanna be a eunuchs developer! Pass me a bread knife!
-
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
-
I think it's an unconscious desire to return to the good old days of BASIC where a variable was identified as containing text characters by using the suffix $. The art of programming has never recovered from the damage done by constructs like, >10 DATA "MY", "TEXT", "DATA" >20 READ A$, B$, C$ >30 LPRINT A$, B$, C$ >50 GOTO 10 >9999 END >RUN Back in the day, A$ was even pronounced, "A-string." :-D
Will Rogers never met me.
'Back in the day, A$ was even pronounced, "A-string."' Absolute intercoursing-bullshit.
-
'Back in the day, A$ was even pronounced, "A-string."' Absolute intercoursing-bullshit.
-
Everybody every programmer I knew pronounced it that way. Even professional Fortran and Cobol programmers recognised the convention from their early Basic days. (Who didn't learn programming via Basic?)
I did not learn programming from BASIC, for one. As it has not been invented when I learned programming. Is that a valid answer? I accept your correction that you are not aware of any BASIC programmer who did not pronounce it "that way". But that is not my lookout. I began with FORTRAN, an a CDC6600. I subsequently learned BASIC from its inception, and made a large portion of my long professional career from programming in it. But, I have NEVER heard of this vocalisation until you raised it. I have been a professional FORTRAN programmer since 1973, and a COBOL programmer since 1975. Yet I do not recognise this so-called 'convention' in one fraction of an iota. Not with me, nor any of my compartriates. Strange, that. I still call "bovine faeces".
-
On order thanks.
VS2010/Atmel Studio 6.0 ToDo Manager Extension
Version 3.0 now available. There is no place like 127.0.0.1 -
I was just thinking that it seems a bit odd that "string" is so commonly used by programmers to refer to some text. I would think "text" would be more appropriate. If we are using "string" just because it refers to a string of characters (aka, a sequence of characters), then why not also call numbers "strings" (as they are strings/sequences of digits and some other characters)? Any theories as to why "string" prevailed?
The next project I start or join on the "ground floor" will ban String/Text as a datatype. Everything declared as a String could and should have a more descriptive data type. Which API is more descriptive? assign(String, String) OR assign(EmployeeId, DepartmentId)