[fdo-dev] Pre-conditions and unsafe constuctions

Traian Stanev traian.stanev at autodesk.com
Thu Dec 7 12:31:37 EST 2006



The problem reported there looks like it's simply programmer oversight
(which happens when there are so many classes floating around). I don't
know of a blanket way to fix incorrect use of casting, apart from making
everyone program in Java or C#.

Traian

 

-----Original Message-----
From: Mateusz Loskot [mailto:mateusz at loskot.net] 
Sent: Thursday, December 07, 2006 12:24 PM
To: dev at fdo.osgeo.org
Subject: Re: [fdo-dev] Pre-conditions and unsafe constuctions

Mateusz Loskot wrote:
> Traian Stanev wrote:
>> Hi Mateusz.
>>
>> I think you're overthinking it. Use whatever cast will do the job 
>> correctly.
> 
> Hi Traian,
> 
> I'm just trying to understand the rationale behind SmartCast and 
> DownCast, and why errors are not reported with exception.
> 
> I will try to ask another way:
> 
> What should the FDO do if dynamic_cast fails?

My reasoning behind asking these questions is that I see I can expect in
FDO problem as reported here:

https://fdo.osgeo.org/servlets/Scarab?id=FDO123

So, I'm looking for good solution that will help me to catch these kind
of problems.
At best, I'd prefer to stick to "FDO way", what I'm asking for.

OK, let's forget these questions.
I'll do it as best as I can and I see what reviewers will tell about it.

Cheers
--
Mateusz Loskot
http://mateusz.loskot.net

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe at fdo.osgeo.org For additional
commands, e-mail: dev-help at fdo.osgeo.org







More information about the Fdo_dev mailing list