Comparison chart worries

Kevin Bealer kevinbealer at gmail.com
Wed Jan 17 12:08:05 PST 2007


== Quote from James Dennett (jdennett at acm.org)'s article
> Kevin Bealer wrote:
> > I'm kind of glad its not going away completely, because I've always found the
> > links on column #0 provide a neat resource for finding things like "static if"
> > when you don't remember the syntax (or keyword!) that makes it tick.
> >
> > I'm wondering if a larger version like this would be useful:
> >
> > |String support:
> > | D                   C                   C++           Java
> > | UTF8,16,32 types    char*, null         string and    Special class with
> > | used with D's       terminated          wstring are   language support;
> > | static + dynamic    arrays with         ASCII and     is an immutable
> > | arrays.             libc's string.h     UTF16 array   array of UTF16
> > |                     support functions.  classes.      codepoints.
> >
> > It could be a mixture of "what exists" plus "how to do it".
> It would be good to get a C++ person to check it over,
> so that it doesn't say that wstring is tied to UTF-16,
> for example (particularly as C++09 is very likely to
> bring support for Unicode strings to C++, and wstring
> is intended for fixed-width encodings which excludes
> UTF-16, though on many or most platforms it is quite
> reasonable to store UCS4 in std::wstrings).
> -- James

I meant this just as an example, but the kind of complexity you are describing
makes me think that an actual description of how or what is supported would be
too problematic after all.

When I wrote the above 'chart line' I was thinking that most of the keyword or
key-phrase items like wstring and "Java String" would be links to more useful
resources.  Maybe it would be better to *just* have a link.

|String support:
| D               C                   C++                 Java
| <char[]>        <link to C howto>   <cppreference link> <class String>

Each could link to an online resource that does a more thorough job of
describing the technique -- this would allow Sun to make the case for
Java's design.  So if D's 'String' link points at a "why use char[]"
page, it wouldn't seem biased, since all the links go to advocates,
owners, or resources specific to the respective languages.

Kevin



More information about the Digitalmars-d mailing list