asc-community/AngouriMath

[WIP] Complete redesign of AngouriMath.FSharp

WhiteBlackGoose opened this issue · 0 comments

Current problem

  1. First of all, naming is weird. E. g. simplified and compiled feel weird (not to mention derivative vs derivativeNode)
  2. Second, too long naming. derivative seems imo too long for something so commonly used. I think we can make it short.3.
  3. There are also some poorly named functions, like asNumber. What does it do? Well, it evaluates to a number.
  4. Weird undocumented operators, like this one
  5. Shortcuts which are too simple to take space in the library, and aren't very convenient to remember without IDE support

Suggested API

It should be concise, clear, consistent.

AngouriMath.FSharp.Functions

val simplify : obj -> Entity
val eval : obj -> Entity
val sub : (var : obj) -> (value : obj) -> (expr : obj) -> obj

val toInt32 : obj -> int
val toInt64 : obj -> long
val toFloat32 : obj -> float
val toFloat64 : obj -> double
val toBool : obj -> bool