← Back to team overview

kicad-developers team mailing list archive

Re: VECTOR2I and VECTOR2D

 

A specification for substantial changes like this should document clearly the hierarchy of inheritance, each class's functions and expected returns. There are some very good references out there on how to write specs [1][2][3].

This is not to dismiss Reece's suggestion. I think it is a good one and potentially quite beneficial long-term. I also think Reece is approaching this the right way by writing a short e-mail to the list first before pouring effort into the spec. I'm not quite certain whether Reece is suggesting that he'd like to make this change or whether it is being proposed as a wishlist item for future work. If it is the former, it needs a spec. If it is the latter, we can do that when it is on someone's to-do list.

Best-
Seth

[1] https://www.joelonsoftware.com/2000/10/02/painless-functional-specifications-part-1-why-bother/ [2] https://books.google.com/books/about/Specification_by_Example.html?id=5F5PYgEACAAJ
[3] https://codeburst.io/on-writing-tech-specs-6404c9791159

On 2019-06-22 21:37, hauptmech wrote:
Isn't Reece's original post the spec? In summary, the name VECTOR is
confusing and the type structure could be expanded on to offer more
compile time checks. He proposes a KiPoint and KiDelta, and describes
their behavior clearly enough for anyone that does geometry
calculations. What's missing from the spec?



On 23/06/2019 2:52 AM, Seth Hillbrand wrote:
On 2019-06-21 22:54, Reece R. Pollack wrote:
Doing this now, before we go too far down the path of replacing
wxWidgets types with non-OOB arrays would enhance readability and make
the code more robust. Using VECTOR2I is going the wrong way.

Hi Reece-

Codebase cleaning like you suggest can go a long way toward improving sustainability and readability.  But done the wrong way, it will have the opposite effect as we fight with return types that aren't fully matched.

Before we decide to do this type of deep plumbing on the KiCad innards, I'd love to see the proposed specification for what's being implemented.  Otherwise, this'll be a bike shedding discussion.

-S

_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp



_______________________________________________
Mailing list: https://launchpad.net/~kicad-developers
Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~kicad-developers
More help   : https://help.launchpad.net/ListHelp


References