How about a new property for class and struct to get the fully qualified name?
Stefan Koch
uplink.coder at googlemail.com
Fri Jul 17 15:37:48 UTC 2020
On Friday, 17 July 2020 at 02:44:52 UTC, Heromyth wrote:
> How about a new property for class and struct like `.stringof`
> to get the fully qualified name?
>
> I know the `fullyQualifiedName` can do this. If a new property
> like `.qualifiedName` added to class and struct, the code blown:
>
> @Middleware(fullyQualifiedName!(IpFilterMiddleware),
> fullyQualifiedName!(BasicAuthMiddleware))
> @Action string security() {
> return "It's a security page.";
> }
>
> may be changed as:
>
> @Middleware(IpFilterMiddleware.qualifiedName,
> BasicAuthMiddleware.qualifiedName)
> @Action string security() {
> return "It's a security page.";
> }
>
> It looks better, does it?
There is a second reason for wanting it, which is that the
fullyQualified name template is rather expensive to instantiate.
More information about the Digitalmars-d
mailing list