Related articles |
---|
[6 earlier articles] |
Re: Internal Representation of Strings cfc@shell01.TheWorld.com (Chris F Clark) (2009-02-14) |
Re: Internal Representation of Strings lkrupp@pssw.nospam.com.invalid (Louis Krupp) (2009-02-14) |
Re: Internal Representation of Strings cr88192@hotmail.com (cr88192) (2009-02-16) |
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) |
[21 later articles] |
From: | wclodius@lost-alamos.pet (William Clodius) |
Newsgroups: | comp.compilers |
Date: | Mon, 16 Feb 2009 19:24:24 -0700 |
Organization: | Compilers Central |
References: | 09-02-051 |
Keywords: | storage, design |
Posted-Date: | 17 Feb 2009 16:00:39 EST |
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. 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.
--
Bill Clodius
los the lost and net the pet to email
Return to the
comp.compilers page.
Search the
comp.compilers archives again.