6 ms·
Wrote a fairly complex optimization-based translational trajectory generator for a robot arm. Needed orientation as well. Implemented a simple quaternion type,
by GlenTheMachine 4y ago
Wrote a fairly complex optimization-based translational trajectory generator for a robot arm. Needed orientation as well. Implemented a simple quaternion type, implemented multiplication and addition for it, and fed it to the translational code. Worked off the bat.
If I wanted to use eg Euler angles or modified Rodriguez vectors or some other representation of rotation, the identical code pattern would work.
- gpderetta 4y agoBut why do you need multiple dispatch? why do you need dynamic dispatch at all in fact? Any language with semi-decent support for generic programming (via traits, type classes, overloading, what have you) should be able to do the above.
- borodi 4y agoThat's one of the cool things about Julia. If it can prove the types of the arguments to a function, or at least reduce them to a small set. It can do the dispatch at compile time. Well, Julia has better than semi decent support for generics, since every function is by definition a generic.
- gpderetta 4y agoThat's an advantage versus other dynamic languages without multiple dispatch, but statically typed languages do not have this issue in the first place. The only other dynamic language used for numerical stuff is Python, but its issues go well beyond lack of MD. MD can be useful for static languages of course, but it comes up significantly less often and static MD is simply overloading/ad-hoc polymorphism.