On 1/20/23 07:01, torhu wrote:

> But why not have drawLine just be a free function?

Exactly.

If I'm not mistaken, and please teach me if I am wrong, they are practically free functions in Java as well. That Java class is working as a namespace. So, the function above is the same as the following free-standing function in D, C++, C, and many other languages:

  void Algo_drawLine(Canvas c, Pos from, Pos to) { ...... };

Ali

Reply via email to