equivariant functions
Christopher Wright
dhasenan at gmail.com
Tue Oct 14 17:09:59 PDT 2008
KennyTM~ wrote:
> Sorry, I can't think of an existing keyword that can clearly qualify the
> purpose in this syntax (“stuff(Type) f(stuff(Type) s)”) either.
>
> By the explanation argument, I actually mean what a programmer first
> sees this feature think of. Presented with Andrei's “typeof” syntax, I
> can at least guess what the function looks like (it returns the same
> type as “s”, OK); but with “inout” I just stopped with "What the heck is
> going on?!".
I can't:
typeof(s) foo(const(char)[] s)
This looks like it's shorthand for:
const(char)[] foo(const(char)[] s)
And the examples with typeof(A), where A is a type, just didn't make any
sense.
More information about the Digitalmars-d
mailing list