3 ms·
> (strings are a fundamental datatype in any language) (Probably a bit "unfair" to "pounce" on an off-hand paranthetical like this, but I'm in a bit of a pedan
by lomnakkus 10y ago
> (strings are a fundamental datatype in any language)
(Probably a bit "unfair" to "pounce" on an off-hand paranthetical like this, but I'm in a bit of a pedantic mood...)
This is not true for e.g. Haskell. In Haskell it's defined as [Char], i.e. a list of characters. (Of course the Haskell community is suffering from that decision, but that's another story.)
I'm not sure why strings would need to be a fundamendal type, though. Sure, they would probably be part of the standard library for almost all languages, but they don't need to be "magical" in the way most fundamental types (int, etc.) are.