[Prev][Next][Index][Thread]

Re: GD: <c-string> question



"Gabor Greif" <gabor@mac.com> writes:

> Right now I use
> make(<c-string>, string: "Hello")
> which works, but is it OK?

I'm astonished that this works, it shouldn't as far as I understand
the code. What you usually do is:

as(<c-string>, "Hello");

Working on native Dylan strings has a couple of advantages, such as
working bounds checking, 0 allowed as a character in the string,
etc. Only use a c-string when passing to native C code. In an ideal
world, you wouldn't even notice the existence of this class.

Andreas

-- 
http://www.gwydiondylan.org/ Open-Source implementation of Dylan,
the object-oriented, dynamic programming language.