26

Possible Duplicate:
The History Behind the Definition of a 'String'

About the only thing every programming language I've seen is able to agree upon is that a variable that refers to a block of text is called a "string." Why? Where does the name come from, and how did it become idiomatic across programming in general?

Aryan Beezadhur
  • 4,503
  • 4
  • 21
  • 42
Mason Wheeler
  • 82,511
  • 50
  • 270
  • 477
  • 1
    In Ioke and Seph it is called a `Text`, which -- unlike `String` -- actually makes sense. `String` is not a description of a data type, it is a specific implementation. Which leads to such absurdities as PyPy, whose `string` s aren't even implemented as Strings, they are implemented as *Ropes*. (Similar to Ruby's `Hash`. Why oh why couldn't Matz just call it a `Map` like every friggin' other programming language on the planet?) – Jörg W Mittag Dec 09 '10 at 19:15
  • @Jörg: Ioke and Seph? Never heard of them. What are those? – Mason Wheeler Dec 09 '10 at 19:16
  • [Ioke](http://Ioke.Org/) is a language experiment by [Ola Bini](http://OlaBini.Com/) which focuses 100% on epxressivity. Basically, Ola is a big fan of Common Lisp, which he considers the most expressive language ever created. Yet, if you read the spec, on almost every page there is an instance where the spec makes some sort of compromise for performance or ease of implementation. So he thought if his favorite language is actually just a compromise, what would a language look like which doesn't care about performance, implementability, only about expressiveness. That's Seph. – Jörg W Mittag Dec 09 '10 at 19:23
  • 1
    [Seph](http://Seph-Lang.Org/) is a more practical successor to Ioke, with its own sets of experiments (e.g. concurrency, modularity). One thing that both Ioke and Seph have in common, is that Ola also experimented with naming. The datatype for *text* is actually called `Text`, the datatype for a *number* is actually called `Number` (and it actually *behaves like a number*, too, i.e. 2 billion plus 2 billion is 4 billion not some negative number and 2 divided by 3 is two thirds, not 0). Unlike C99 which has 10(!) different number types, none of which behaves like a number. – Jörg W Mittag Dec 09 '10 at 19:29
  • The origin of the inheritance hierarchy is called `Origin` not `Object`, the current execution context is called a *ground*, not stack frame or activation record. – Jörg W Mittag Dec 09 '10 at 19:30
  • [Ola talked about both Ioke and Seph at the Emerging Languages Camp 2010](http://Confreaks.Net/videos/116/). The presentation is a little bit cramped, since the presentation were strictly limited to 20 minutes and he was presenting *two* languages in that timeslot. He has given several other, often *much* longer talks just on Ioke, which you can find by some googling or spelunking on his blog. BTW: the other talks are amazing, too. Newspeak is one of my favorite languages, Frink is just awesome and the Thyrd talk is simply amazing. Ur is really neat and of course Go is everybody's darling. – Jörg W Mittag Dec 09 '10 at 19:38

2 Answers2

3

Great question! This might be somewhat helpful:

Strings are called "strings" because they are made up of a sequence, or string, of characters.

Source: http://www.vias.org/cppcourse/chap07_03.html

Shimmy Weitzhandler
  • 101,809
  • 122
  • 424
  • 632
samxli
  • 1,536
  • 5
  • 17
  • 28
0

Very interesting,

The very definition of a string (according to Princeton at least) is:

a linear sequence of symbols

So, since the String datatype is a sequence of characters/symbols, it rather fits the definition.

Rodney Blythe
  • 149
  • 2
  • 5