www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - Re: On the richness of C++

reply bearophile <bearophileHUGS lycos.com> writes:
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/ ).

bearophile
Apr 15 2008
parent reply "Janice Caron" <caron800 googlemail.com> writes:
On 15/04/2008, bearophile <bearophileHUGS 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?
Apr 15 2008
parent Bill Baxter <dnewsgroup billbaxter.com> writes:
Janice Caron wrote:
 On 15/04/2008, bearophile <bearophileHUGS 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
Apr 15 2008