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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I am recently redesigning public API along with making the macro implementation modular in #12. This will replace current
@CodablePath
and@CodableCompose
with@CodedAt
and@CodedIn
macros. There will be no reduction in functionality provided by this library, and existing functionality can be preserved by doing following modifications:@CodableCompose
usage with@CodedAt
macro without any path arguments.@CodablePath
usage with path arguments with@CodedAt
macro with the same path arguments.@CodablePath
usage without path arguments with@CodedIn
macro without any path arguments.Currently you can specify default value and custom serializer with
default
andhelper
arguments respectively. This makes the macro syntax heavy over the variable declaration. I am thinking of breaking these functionalities into separate macros, i.e.default
argument will be removed and replaced with@Default
macro.helper
argument will be removed and replaced with@CodedBy
macro.The current syntax:
can be transformed to:
2 votes ·
Beta Was this translation helpful? Give feedback.
All reactions