From ed079ebfbdadb5e5bc65122e02d54e89962898a9 Mon Sep 17 00:00:00 2001 From: skl131313 Date: Mon, 1 Jan 2018 22:06:18 -0500 Subject: [PATCH] Clarifcations in exiting solutions. --- DIPs/dip10ss.md | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/DIPs/dip10ss.md b/DIPs/dip10ss.md index 9122a7193..6dede3219 100644 --- a/DIPs/dip10ss.md +++ b/DIPs/dip10ss.md @@ -84,7 +84,7 @@ Parameter: ## Existing Solutions -Apply UDA through parent symbol with additional information for which child it should be applied to: +A current solution for applying an UDA to an enum or parameter is to use an UDA on the parent symbol with some additional information for which child element it should be applied to. This allows the desired UDA to be used and associated with the desired symbol. It introduces some duplication and the information stored in the UDA is separated from the rest of the information of the symbol. ```D @MyUda("feature0", "...") @@ -101,9 +101,7 @@ void foo(int param0) } ``` -This allows the desired UDA to be used and associated with the desired symbol. It introduces some duplication and the information stored in the UDA is separated from the rest of the information of the symbol. - -Deprecation of an enum can be done by reimplementing an enum as a structure with static enums as follows: +A solution for the deprecation of an enum can be done by reimplementing an enum as a structure with static enums. This allows the `deprecation` attribute to be placed with the desired enum member. ```D enum SomeEnumImpl @@ -113,7 +111,7 @@ enum SomeEnumImpl actualValue3 = 3, } -public struct SomeEnum +struct SomeEnum { SomeEnumImpl x; alias this x;