|
From: Chuck H. <cah...@ea...> - 2005-01-31 19:08:44
|
My question is whether there is a good reason for private scope in QuantLib= classes. I would like QuantLib to have protected scope rather than private= so that developers can inherit the local variables and methods in their su= bclasses. In my specific example my financial analyst trusts nothing and always wants= to see the intimate details of all calculations to validate correct operat= ion of the classes we use from QuantLib and those classes that we write. We= recently wrote a class to calculate the forward volatilities for caps usin= g the CapFloor and BlackCapFloorEngine classes. Since these classes hide im= portant parts in private scope I couldn=92t inherit from them and display t= heir guts, so I copied the CapFloor and BlackCapFloorEngine classes, change= d private to protected, inherited from the copies, and wrote subclasses wit= h methods to save and display the caplet/floorlet values at each iteration = and some other intimate details. Copying QuantLib classes and inheriting fr= om them makes me feel like I am doing something foolish and shortsighted. regards, Charles |