Talk:String (computing)
Jump to navigation
Jump to search
So far, this article has a bit too much (and yet not enough) about how a language like Python may automatically assign a string or numeric type to a variable.
As a programmer, I'd like to point out that the value "123" as a string is merely a series of three characters, while 123 is an integer. In certain contexts, you'd like them to be considered equal, but in others you might not.
- When append the character "4" to the string, you'd expect to get "1234", which could be a phone extension or a serial number.
- When adding the number 4 to the number 123 you need to get 127 as a sum.
I don't know whether our article should begin with this problem. Maybe we should write a bit more about what a string is, and give examples in several languages. I can write about Visual Basic, C, Java, PHP and (shudder) "JavaScript". --Ed Poor 19:41, 15 April 2010 (UTC)