Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement - Using infix on instead of operator unaryPlus #1

Closed
msasikanth opened this issue Aug 16, 2018 · 1 comment
Closed

Enhancement - Using infix on instead of operator unaryPlus #1

msasikanth opened this issue Aug 16, 2018 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@msasikanth
Copy link

Right now the library allows to set the target using + operator
constraintLayout.transition { +helloWorldText }

instead of using that, using a infix function named as on will make more sense

eg: constraintLayout.transition { on helloWorldText }

@arunkumar9t2
Copy link
Owner

Hey,

That's a nice idea. But currently Kotlin does not support using infix function in a lamda receiver context. This means instead of writing on helloWorldText it would be this on helloWorldText or on(helloWorldText) which kinda breaks the point of simpler syntax.

For now I am keeping the + for add target - for remove target.

More about infix inside lamda : https://youtrack.jetbrains.com/issue/KT-1292

@arunkumar9t2 arunkumar9t2 added the enhancement New feature or request label Sep 18, 2018
@arunkumar9t2 arunkumar9t2 self-assigned this Sep 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants