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

Have settings file with extension methods #16

Open
CodesAway opened this issue May 29, 2021 · 1 comment
Open

Have settings file with extension methods #16

CodesAway opened this issue May 29, 2021 · 1 comment
Labels
enhancement New feature or request
Milestone

Comments

@CodesAway
Copy link
Owner

Allow user-defined extension method like templates so can saying things like x is positive where x is a BigDecimal and have it convert into code such x.signum() > 0

Essentially, create an additional method "isPositve" which inlines the logic. This way, can use existing speech to code functionality. For example x is empty will invoke x.isEmpty() for String and Collection since there's a method named isEmpty. Whereas, if x is a StringBuilder, there is no isEmpty method. However, an extension method could be defined so that the code becomes x.length() == 0

I could define some predefined extension methods and the user can add their own.

@CodesAway CodesAway added the enhancement New feature or request label May 29, 2021
@CodesAway CodesAway added this to the v0.1.0 milestone May 29, 2021
@CodesAway
Copy link
Owner Author

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

1 participant