Gui.cs: PosAbsolute and DimAbsolute should be private.

Created on 12 Jul 2020  路  2Comments  路  Source: migueldeicaza/gui.cs

As @tig rightly stated here https://github.com/migueldeicaza/gui.cs/pull/777#discussion_r453341301, these classes should continue to be private rather than internal.

design

Most helpful comment

Hello team,

I am just back, and I love the work that both @BDisp and @tig have done purely from the screenshots and animations that have been shared here - they are fantastic.

Short version: I think that these could be internal, and that it is fine to use is to probe the nature of the type.

Longer version:

Now, on this particular subject, the way that I think about this, is that while I believe that it is best if the design of the Pos/Dim system was as comprehensive as possible to not necessitate any probing on types, this comes at the cost of additional complexity in the interface of this design. For example, I could envision adding additional methods to the interface, but that is just one possibility, and an ugly one.

At the end of the day, what matters is that the Pos/Dim system works for the end user, and we have some latitude internally as to what we can do to achieve that goal. I think that making some of the supporting classes like PosAbsolute and DimAbsolute "internal" and probing explicitly against them fits within the design, and is an acceptable internal interface. So I would keep things internal and be explicit that this is an ok thing to probe for.

Miguel.

All 2 comments

Hello team,

I am just back, and I love the work that both @BDisp and @tig have done purely from the screenshots and animations that have been shared here - they are fantastic.

Short version: I think that these could be internal, and that it is fine to use is to probe the nature of the type.

Longer version:

Now, on this particular subject, the way that I think about this, is that while I believe that it is best if the design of the Pos/Dim system was as comprehensive as possible to not necessitate any probing on types, this comes at the cost of additional complexity in the interface of this design. For example, I could envision adding additional methods to the interface, but that is just one possibility, and an ugly one.

At the end of the day, what matters is that the Pos/Dim system works for the end user, and we have some latitude internally as to what we can do to achieve that goal. I think that making some of the supporting classes like PosAbsolute and DimAbsolute "internal" and probing explicitly against them fits within the design, and is an acceptable internal interface. So I would keep things internal and be explicit that this is an ok thing to probe for.

Miguel.

Gracias!

Was this page helpful?
0 / 5 - 0 ratings