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

Kotlin port #107

Open
elect86 opened this issue May 25, 2020 · 0 comments
Open

Kotlin port #107

elect86 opened this issue May 25, 2020 · 0 comments

Comments

@elect86
Copy link

elect86 commented May 25, 2020

Hi,

yesterday I (finished to) port exp4j to kotlin

it features a couple of things like:

  • automatic build inside Expression constructor, no more ExpressionBuilder
  • setting variables and function directly by passing them in the Expression constructor
  • builtin variables x, y, z and w
  • functions signatures compatible with others numbers other than Double (Int and Long to mention)
  • added factorial to the builtin operators
  • added postfix property to the operator class
  • possibility to add/remove from builtin functions
  • using gradle

the only downside is that is not possible to use functions with varargs arguments (right now you can define up to 9 arguments)

I ported all the tests + some of the open issues

Right now it's shaped around Kotlin, but if you are interested, I can modify it to make easier to use it from java (ie: by switching to functional interfaces) and create a PR

Interested?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant