[geos-devel] No default constructor in Triangle

Mateusz Łoskot mateusz at loskot.net
Thu Mar 30 05:37:26 EST 2006


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?

Cheers
-- 
Mateusz Łoskot
http://mateusz.loskot.net



More information about the geos-devel mailing list