Posted by
Luigi Ballabio on
URL: http://quantlib.414.s1.nabble.com/Re-QuantLib-svn-SF-net-SVN-quantlib-16174-trunk-QuantLib-tp12657.html
On Thu, 2009-04-16 at 14:56 +0000,
[hidden email] wrote:
> Revision: 16174
>
http://quantlib.svn.sourceforge.net/quantlib/?rev=16174&view=rev> Author: nando
>
> Log Message:
> -----------
> - added static Event::hasOccurredFunction to encapsulate the hasOccurred logic to be used also by non-Event object
If it's generic logic, it shouldn't be in the Event class, even as a
static method. Then again, if you want to use it somewhere else, it's
probably a sign that something else should be inherited from Event and
is currently missing.
> - modified Event:Date() to return a const reference
This doesn't give you anything (allocating a reference is just as costly
as allocating a Date on the stack, since Date only contains a long. Any
number of methods doesn't make a class any more heavier to instantiate)
and forces any Event class to store the date, thus preventing it from
calculating the date on the fly.
In short, I'd revert the whole changeset, at least until we think a bit
more about it. Objections?
Luigi
--
Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away.
-- Antoine de Saint-Exupery
------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32.
http://p.sf.net/sfu/p_______________________________________________
QuantLib-dev mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-dev