[Ns-developers] Ipv4Address and Ipv4Mask, getting rid of "implicit" constructors
craigdo@ee.washington.edu
craigdo at ee.washington.edu
Tue May 13 20:01:15 PDT 2008
> > I would like to make all these constructors "explicit",
> thus you have to
> > type Ipv4Address ("1.2.3.4") instead of "1.2.3.4".
> >
> > Comments?
>
> +1: avoids many implicit conversion traps.
It's a lot of "extra" typing for manual address assignment, but now that we
have automagic IP address generation in place I don't see it as being a huge
nuisance.
Of course, the tutorial uses this as an example of how type implicit type
conversion works, so it's my turn to have the same reaction as Gustavo about
API changes. Every time we make a change like this it obsoletes large
sections of documentation. I suppose we could change the implicit type
section to talk about node helpers, but it's more work.
What kind of traps are you trying to avoid? Can you give me an illustration
of what would be a plausible scenario that would be avoided?
-- C
More information about the Ns-developers
mailing list