FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Rectangle -> Rect?

 
Post new topic   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DFL
View previous topic :: View next topic  

Status of Rectangle struct name
Add alias Rectangle Rect; let the programmer choose which to use.
20%
 20%  [ 1 ]
Rename Rectangle to Rect and deprecate Rectangle.
60%
 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%
 20%  [ 1 ]
It doesn't matter to me.
0%
 0%  [ 0 ]
Total Votes : 5

Author Message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Tue Nov 30, 2004 7:26 am    Post subject: Rectangle -> Rect? Reply with quote

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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Sat Dec 11, 2004 2:27 pm    Post subject: Reply with quote

I guess I'll rename Rectangle to Rect and deprecate Rectangle. Last chance to vote!
Back to top
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sat Dec 11, 2004 2:52 pm    Post subject: Reply with quote

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. Smile

Later,

John
Back to top
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Sun Dec 12, 2004 8:35 pm    Post subject: Reply with quote

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
View user's profile Send private message
JJR



Joined: 22 Feb 2004
Posts: 1104

PostPosted: Sun Dec 12, 2004 8:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group