POLL: wx.DC methods

First of all, thanks Robin Dunn for all the hard work! I personally
believe that wxPython is going to be the basis for the best commercial
applications of the future (Chandler included.)

on (x, y, blah) vs. (p, blah):

I don't think there was enough wrong with the old way: x, y to make it
worth breaking people's code. People rely on these sorts of things to
stay the same _forever_. If it ever changes, then someone has to start
fixing / changing code.

In Object oriented design, it's similar to the Liskov Substitution
Principle When you substitute new code for the old, anything that uses
the old must not break. (in OO it reads: For each object o1 of type S
there is an object o2 of type T such that for all programs P defined in
terms of T, the behavior of P is unchanged when o1 is substituted for o2
then S is a subtype of T.) (Barbara Liskov, "Data Abstraction and
Hierarchy" SIGPLAN notices, 23,5 (May, 1998))

So I don't have any problem with the new wx namespace, because anything
that uses the old doesn't break. But changing the parameters of the
basic functions is enough to drive programmers like me back to C++ land
where I'm confident I'm on solid ground and nothing's going to change
underneath my application and break it.

So, that would be a vote for B.

Thanks,
-Jim

···

-----Original Message-----
From: Robin Dunn [mailto:robin@alldunn.com]
Sent: Wednesday, April 21, 2004 3:32 PM
To: wxPython-users
Subject: [wxPython-users] POLL: wx.DC methods

Hi all,

Ever since I made the changes to the wx.DC methods I've gone back and
forth on whether I like it or not. The general consensus on
wxPython-dev was that it was a good idea, but since it still hasn't sunk

in for me I thought I would try to get opinions from a wider audience.

Please (re)read this section of the MigrationGuide and then vote for one

of the following:

http://wxpython.org/MigrationGuide.html#new-wx-dc-methods

A) It's fine as-is, please leave it alone for future versions

B) It stinks, consistency isn't that important. Revert it.

C) Allow both TypeA and TypeB methods to use the same "normal" name.[1]

[1] This is possible using SWIG 1.3's method overloading abilities, but
we will lose the use of keyword args for those methods. IOW, both of
these will be possible:

  dc.DrawBitmap(bmp, x, y)
  dc.DrawBitmap(bmp, point)

but because of what SWIG has to do to make overloading work you would
only be able to use positional args, so this would not be allowed:

  dc.Blit(dest, size, otherDC, src, useMask=True)

If I do (C) then I'll leave the 'XY' versions in place for a few
releases as aliases.

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

???
What world are you living in?
:wink:

- Sam

···

At 2004-04-22 08:54 AM -0400, you wrote:

C++ land
where I'm confident I'm on solid ground and nothing's going to change
underneath my application and break it.

__________________________________________________________
Spinward Stars, LLC Samuel Reynolds
Software Consulting and Development 303-805-1446
http://SpinwardStars.com/ sam@SpinwardStars.com