I am thinking about alight change in API that will...
# mathematics
a
I am thinking about alight change in API that will allow to generate ndfields and other context-based constructs in a more natural way. Instead of adding them to
NDField
companions, we can add them as extensions of
Field
objects. In this case the call will look like this:
Copy code
BigDecimalField{ //make field invokable
  ndField(dim1,dim2,dim3){
    ...
  }
}
If we are living ina
BigDecimal
world, then we can just designate all functions as
fun BigDecimalField.doSomething()
and avoid top level declaration. This way we can even write universal functions with non-specialized fields this way. In future, KEEP-176 will really simplify those things, especially if file-level receivers are implemented. Discussion is welcome.