[geos-devel] No default constructor in Triangle

strk at refractions.net strk at refractions.net
Thu Mar 30 13:09:16 EST 2006


On Thu, Mar 30, 2006 at 12:37:26PM +0200, Mateusz Å?oskot wrote:
> strk at refractions.net wrote:
> > On Thu, Mar 30, 2006 at 07:02:27AM +0200, Mateusz Ã
?oskot wrote:
> >> Hi,
> >> 
> >> Is there any rationale behind not including default constructor in
> >>  Triangle class? I can't see any such. If user would want to create
> >>  a collection of triangles then the situation becomes quite
> >> complex, so I'd suggest to include default constructor.
> > 
> > That's JTS design decision.
> 
> Hmm :-)
> I don't get it because construction and initialization in Java is
> different than in C++. Consider, default initializator of Object types
> is null. In C++ there is no such term as default initializator.
> 
> > I'd be more concerned about it using real Coordinates rather then 
> > pointers. Do you want to check that ?
> 
> I'm not sure what pointer are you talking about?
> I'm talking about Triangle class that includes 3 members of type of
> Coordinate. Where are those pointers?

There are none, I'm saying it would better have pointers
rather then values. That way creating vector of default-constructed
Triangles would be more efficient then would be with values.

--strk;



More information about the geos-devel mailing list