How to declare function with the same call signature as another?
Tofu Ninja via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Wed Nov 23 16:04:51 PST 2016
On Wednesday, 23 November 2016 at 23:21:53 UTC, ketmar wrote:
> On Wednesday, 23 November 2016 at 23:02:30 UTC, Tofu Ninja
> wrote:
>> Being able to get an alias to (ref int) seems like a bug.
>
> you are unable to alias it, `ref` will be erased on aliasing.
> the only way to retain it is to have a tuple with it. that
> trick aliases *function* *argument* *tuple*, not a single type.
>
> yeah, `ref` is very special beast. but it is still type
> modifier. ;-)
Unless I can write "alias refint = ref int;", this should not be
a feature at all... how did anyone think this is a good idea.
Seriously I used to love D but now it's just a mess of hacks...
More information about the Digitalmars-d-learn
mailing list