terralang / std

A repository to store code implementing common features, algorithms, and datastructures that are generally useful to terra code
MIT License
21 stars 7 forks source link

Mathematical Functions #8

Open aiverson opened 5 years ago

aiverson commented 5 years ago

Should Terra implementation of mathematical operations be included in the stdlib?

For example, quicksand has an automatic differentiation library that looks generally useful. Should that be part of the stdlib?

What about Geometric Algebra Multivectors, an FFT, Linear Algebra operators, etc.?

Basically, should any fairly general and reusable mathematical routine that isn't extremely niche be here, should there be a supplementary math library, or should they be left in separate projects?

Qix- commented 5 years ago

My vote is separate projects. FFT is not something where its implementation may vary between platforms, for example. A simple maths library perhaps, to the extent that most other languages offer (trig functions, etc.)

aiverson commented 5 years ago

I don't think that the implementation varies between platforms is the only reason, or even the main reason to put something in the standard library. The standard library should be high quality implementations of basic operations that almost every project will need. After thinking about it for a bit longer, these mathematical operations should be separate libraries, but we need to figure out how to depend on a library conveniently.