kotlin-graphics / glm

jvm glm
129 stars 21 forks source link

Should we turn methods on VecX objects into extensions (Java Interop)? #29

Open kyay10 opened 1 year ago

kyay10 commented 1 year ago

Hello,

There's some experimentation happening with adding interfaces into the VecX hierarchy to allow distinguishing between mutable and read-only vectors. While working on this, I encountered issues with glm's usage of inline methods inside the VecX classes. We define a lot of convenience functions on every vector (like plus, minus, etc) and all of which can be turned into extension functions. The benefits of turning them into extensions include:

The disadvantages include:

So, this issue is to gather feedback on whether Java Interop matters much to you. As a compromise, we can make just the inline functions into extensions.