[Ns-bugs] [Bug 146] Ipv4Address API cleanup

bugzilla-daemon@nsnam-www.ece.gatech.edu bugzilla-daemon at nsnam-www.ece.gatech.edu
Mon Mar 17 19:40:28 PDT 2008


http://www.nsnam.org/bugzilla/show_bug.cgi?id=146





------- Comment #3 from tomh at tomh.org  2008-03-17 22:40 -------
(In reply to comment #2)
> (In reply to comment #0)
> > This patch proposes to remove the "HostOrder" postfix of the name of getters
> > and setters in Ipv4Address.  Instead, all Getters and Setters are host order;
> > if we introduce network order getters and setters, we could perhaps qualify
> > those with the "NetworkOrder" postfix such as "SetNetworkOrder" (but presently
> > there are no such methods).
> 
> I think that the long method name is actually nice and descriptive so, I find
> it weird to make the method names less descriptive.
> 

Yes, it is more descriptive, but longer to type, and e.g. the constructor
assumes host order without such a qualifier.  All of the getters and setters
are host order; we have network byte order methods but they are called
Serialize and Deserialize and operate on a byte array.

I could live with GetHostOrder and SetHostOrder if we removed redundant Set()
methods already there, and removed the warnings around their usage, but it
seems simpler to me to just say Set() and Get().


-- 
Configure bugmail: http://www.nsnam.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.


More information about the Ns-bugs mailing list