Suggest upcoming change to macro syntax #13
Closed
soumyamahunt
started this conversation in
Polls
Replies: 1 comment
-
|
Implementation for this added in #14. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am recently redesigning public API along with making the macro implementation modular in #12. This will replace current
@CodablePathand@CodableComposewith@CodedAtand@CodedInmacros. There will be no reduction in functionality provided by this library, and existing functionality can be preserved by doing following modifications:@CodableComposeusage with@CodedAtmacro without any path arguments.@CodablePathusage with path arguments with@CodedAtmacro with the same path arguments.@CodablePathusage without path arguments with@CodedInmacro without any path arguments.Currently you can specify default value and custom serializer with
defaultandhelperarguments respectively. This makes the macro syntax heavy over the variable declaration. I am thinking of breaking these functionalities into separate macros, i.e.defaultargument will be removed and replaced with@Defaultmacro.helperargument will be removed and replaced with@CodedBymacro.The current syntax:
can be transformed to:
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions