Messing with betterC and string type.
SrMordred
patric.dexheimer at gmail.com
Thu Sep 6 17:09:34 UTC 2018
On Thursday, 6 September 2018 at 16:50:01 UTC, Adam D. Ruppe
wrote:
> this(object.string x) {}
Yep, this works.
> which will work - immutable(char)[] is what object.string
> actually is (and the compiler will often use that -
> immutable(char)[], the proper name - and string, the
> user-friendly name, totally interchangably).
Yes, the true problem arrives on the operations like concat "~"
that call some internal function to do that with strings. I can
hijack the string identifier, but i can´t replace the concat
operator right?
(Well, i already tried the module object; trick, but didn´t go
much far with that path.)
> void foo(string s) {}
>
> foo("this");
>
> won't compile, since it won't make a String out of that
> immutable(char)[] literal without an explicit initialization of
> some sort.
>
//cannot pass argument "this" of type string to parameter String s
iep, this seems a real problem. ;/
More information about the Digitalmars-d
mailing list