On Tue, May 28, 2002 at 04:57:01AM -0700, Brent Dax wrote: > I assume the lack of mentions of Buffers are an oversight.
Right. It would be great if there was only one kind of parrot objects... > # (5) do not nest function calls > # (for instance, "e = string_concat (string_concat(a, b), c);" > # would be forbidden) > > I don't understand the reasoning behind (5). Would you care to > elaborate? Actually, the example I give is safe. But consider: e = string_concat (string_concat(a, b), string_concat(c,d)); Let us assume that the argument of the functions are evaluated rightmost first. Then, the return value of "string_concat(a, b)" is not "rooted" anywhere when "string_concat(c,d)" is executed. So, it will be wrongly freed by the GC if a collection occurs at this time. > The macros don't really need a Parrot_ prefix, do they? Right, you can use whatever name you prefer. -- Jerome