Disadvantages of ARC
Dicebot
public at dicebot.lv
Thu Feb 6 08:30:31 PST 2014
On Thursday, 6 February 2014 at 16:25:37 UTC, Andrei Alexandrescu
wrote:
> // lib code
> struct RCSlice(T) { ... }
> alias rcstring = RCSlice!(immutable char);
> rcstring rc!(string s) { ... }
>
> // user code
> auto s1 = buildPath!("hello", "world");
> auto s2 = buildPath!(rc!"hello", rc!"world");
>
> In this example s1 will have type string and s2 will have type
> rcstring.
Looks unnecessary restrictive. Why can't one build rc-string from
stack buffers or Array!char from rc-strings? Type of output
buffer does not have to do anything with input.
More information about the Digitalmars-d
mailing list