Re: Internal Representation of Strings

"Tony" <tony@my.net>
Wed, 18 Feb 2009 08:04:31 -0600

          From comp.compilers

Related articles
[9 earlier articles]
Re: Internal Representation of Strings tony@my.net (Tony) (2009-02-15)
Re: Internal Representation of Strings DrDiettrich1@aol.com (Hans-Peter Diettrich) (2009-02-16)
Re: Internal Representation of Strings bartc@freeuk.com (Bartc) (2009-02-16)
Re: Internal Representation of Strings wclodius@lost-alamos.pet (2009-02-16)
Re: Internal Representation of Strings ArarghMail902@Arargh.com (2009-02-17)
Re: Internal Representation of Strings bartc@freeuk.com (Bartc) (2009-02-18)
Re: Internal Representation of Strings tony@my.net (Tony) (2009-02-18)
Re: Internal Representation of Strings tony@my.net (Tony) (2009-02-18)
Re: Internal Representation of Strings cr88192@hotmail.com (cr88192) (2009-02-19)
Re: Internal Representation of Strings cr88192@hotmail.com (cr88192) (2009-02-21)
Re: Internal Representation of Strings tony@my.net (Tony) (2009-02-21)
Re: Internal Representation of Strings idbaxter@semdesigns.com (Ira Baxter) (2009-02-21)
Re: Internal Representation of Strings cr88192@hotmail.com (cr88192) (2009-02-22)
[18 later articles]
| List of all articles for this month |
From: "Tony" <tony@my.net>
Newsgroups: comp.compilers
Date: Wed, 18 Feb 2009 08:04:31 -0600
Organization: at&t http://my.att.net/
References: 09-02-051 09-02-086
Keywords: storage
Posted-Date: 18 Feb 2009 17:09:24 EST
X-StarScan-Version: 6.0.0; banners=-,-,-

"William Clodius" <wclodius@lost-alamos.pet> wrote in message
> Tony <tony@my.net> wrote:
>
>> What are some good ways/concepts of internal string representation?
>> Are/should string literals, fixed-length strings and dynamic-lenght
>> strings
>> handled differently? <snip>
>
> The "best" string representations depends on the nature of your language
> and its applications. The forms you describe are largely array based,
> and are typical of imperative languages. They have the advantage of a
> compact form, reducing memory usage, and ease of access to the
> components of the string. Such languages also rely on arrays and provide
> the infrastructure for manipulating arrays.


Yes, that's my current implementation.


> Functional languages will typically use a list of characters. This
> has greater flexibility in string construction and modification, and
> uses the primary data structure of such languages, so that most of
> the infrastructure of the language is readilly available.


OK. I will be working with curly-brace C/C++-like languages for the
forseeable future.


Tony



Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.