From: mgsloan <mg...@gm...> - 2007-03-16 02:24:57
|
Have you already started the haskell version then? :) Anyway, that's a pretty cool hack to allow external Curve implementations, but do we really need it? I'd think a 'data Curve = ' etc would be enough. This is true of the C++ version as well - I'm for compile time polymorphism. If users want to add a curve type, they can contribute to the lib. On 3/15/07, MenTaLguY <me...@ry...> wrote: > > On Thu, 2007-03-15 at 12:01 -0700, MenTaLguY wrote: > > In C++, I don't know whether it would work best for e.g. D2<SBasis> to > > derive from Curve, or whether we keep SBasisCurve, which derives from > > Curve and D2<SBasis> both. > > Alternately, we could do what the Haskell version does -- offer a choice > between compile-time polymorphism (direct uses of SBasis, Bezier, etc) > and run-time polymorphism (wrapped in Curve). > > That lets us choose either approach as appropriate, without forcing a > performance tradeoff. > > -mental > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Lib2geom-devel mailing list > Lib...@li... > https://lists.sourceforge.net/lists/listinfo/lib2geom-devel > > > |