On 2002.07.08, Austin Ziegler <austin / halostatue.ca> wrote:
> 
> C and C++ are very bad examples of this because they have
> notoriously poor string handling. [...] You *expect* strings to act
> like arrays because that's the way that C and C++ do it. I know this
> is how C and C++ do this and curse it every time I have to deal with
> C and C++ and strings.

Exactly.

> When quantum computers are common, then it might
> actually be easier to deal with strings implemented as a hypercube
> or something equally strange. Should users have to know that strings
> are implemented as a hypercube? No. They should know that they are
> Strings, and that's it.

Amen.

The fact that people are used to strings being implemented as an
array of characters because they've worked with C or C++ is merely
coincidence and a breakage that ought to be fixed in newer langauges
that don't have the backward-compatibility issues that the older
languages have.

Coupling the higher-level object hierarchy to the machine's lower-level
internal representation of the data structure is a limiting factor
based on the implementation details.  Bad bad bad.

-- Dossy

-- 
Dossy Shiobara                       mail: dossy / panoptic.com 
Panoptic Computer Network             web: http://www.panoptic.com/ 
  "He realized the fastest way to change is to laugh at your own
    folly -- then you can let go and quickly move on." (p. 70)