lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] WXWIN_COMPATIBILITY_3_x suggestion


From: Vadim Zeitlin
Subject: Re: [lmi] WXWIN_COMPATIBILITY_3_x suggestion
Date: Sun, 13 May 2018 02:57:13 +0200

On Sun, 13 May 2018 00:46:24 +0000 Greg Chicares <address@hidden> wrote:

GC> Next time a new API version is declared, guards could be added around
GC> these backward-compatibility members in include/wx/gdicmn.h :
GC> 
GC>  class WXDLLIMPEXP_CORE wxSize
GC>  {
GC>  public:
GC>      // members are public for compatibility, don't use them directly.
GC>      int x, y;
GC> ...
GC>     // compatibility
GC>     int GetX() const { return x; }
GC>     int GetY() const { return y; }
GC> 
GC> I guess 'x' and 'y' are so convenient that it's easy to resist the
GC> advice to use GetWidth() and GetHeight() instead. But if they're
GC> never deprecated, people will always use 'x' and 'y'.

 I think we have no choice but to accept that it has already happened and
will never change. I can't imagine ever really deprecating, let alone
removing, these members -- there is just too much code using them for the
small benefit of encapsulation to outweigh the immense trouble of updating
all of it.

 So, if anything, it's the comment that should be removed, arguably.

 Regards,
VZ


reply via email to

[Prev in Thread] Current Thread [Next in Thread]