View previous topic :: View next topic |
Status of Rectangle struct name |
Add alias Rectangle Rect; let the programmer choose which to use. |
|
20% |
[ 1 ] |
Rename Rectangle to Rect and deprecate Rectangle. |
|
60% |
[ 3 ] |
Keep Rectangle and don't change anything. The programmer can either not import the Windows API, or use the full name dfl.drawing.Rectangle. |
|
20% |
[ 1 ] |
It doesn't matter to me. |
|
0% |
[ 0 ] |
|
Total Votes : 5 |
|
Author |
Message |
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Tue Nov 30, 2004 7:26 am Post subject: Rectangle -> Rect? |
|
|
After adding drawing functions to DFL, I realized that the Windows GDI function Rectangle() will conflict with DFL's Rectangle struct. What should be done about it? See the poll. |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Sat Dec 11, 2004 2:27 pm Post subject: |
|
|
I guess I'll rename Rectangle to Rect and deprecate Rectangle. Last chance to vote! |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sat Dec 11, 2004 2:52 pm Post subject: |
|
|
Argh... That's too bad. I like the name Rectangle. Of course I'm not a user of DFL so my opinion isn't worth much.
I admit: I picked option #3. I figure you don't always have to use the fully qualified name. You can also use the nifty with() statement.
Later,
John |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Sun Dec 12, 2004 8:35 pm Post subject: |
|
|
JJR wrote: | I admit: I picked option #3. I figure you don't always have to use the fully qualified name. You can also use the nifty with() statement. |
Rectangle is a pretty long name by itself, but dfl.drawing.Rectangle is a time waster. I don't think with() will help in this case.
Code: |
obj.foo = dfl.drawing.Rectangle(a, b, c, d);
obj.bar = dfl.drawing.Rectangle(e, f, g, h);
dfl.drawing.Rectangle myrect;
myrect = dfl.drawing.Rectangle(i, j, k, l);
obj.baz = myrect.x;
|
But thanks for participating.
- Chris |
|
Back to top |
|
|
JJR
Joined: 22 Feb 2004 Posts: 1104
|
Posted: Sun Dec 12, 2004 8:47 pm Post subject: |
|
|
Hello Chris,
Your example does put things in perspective. I tend to agree with you there about it being a time waster.
- John |
|
Back to top |
|
|
|