On the richness of C++
Bill Baxter
dnewsgroup at billbaxter.com
Tue Apr 15 07:24:55 PDT 2008
Janice Caron wrote:
> On 15/04/2008, bearophile <bearophileHUGS at lycos.com> wrote:
>> I can't follow the newsgroup now, but I'd really like to know if you can use D to implement the tricks used by the Blitz++ C++ lib (http://www.oonumerics.org/blitz/ ).
>
> Given that D templates are way, way, /way/ more powerful than C++
> templates, what's to stop you?
The fact that D structs are way way /way/ more wimpy than C++ structs. :-)
But that's changing.
Also that argument deduction in D templates isn't very complete. Nested
types mess it up, like Mike Parker found just recently in another thread.
Lack of template overloading and of overloading across modules can cause
headaches too.
But anyway some people made a "Blitz++-like" library for C#. It just
requires that you use various shades of "unnatural" syntax like
expr.AssignTo(r) instead of r = expr:
http://www.codeproject.com/KB/recipes/dynmatrixmath.aspx
D could at least do better than that, I'm sure.
--bb
More information about the Digitalmars-d
mailing list