Quote:Original post by h3r3tic
D currently supports implicit function template instantiation for non-member functions and will be getting full support soon. The comparison sheet just hadn't been upated when Walter added IFTI to D.
http://www.digitalmars.com/d/template.html
The changelog for DMD.149 states "Added limited support for implicit function template instantiation.". /Limited/ - only for non-members.
In D overloading operators can only be member functions so you still can not write/build/use expression templates and C++ style DSELs until D adds full-support. Either that or D provides a different method of support for writing efficient DSELs.
Quote:Original post by h3r3tic
Even without IFTI, D's templates are more powerful than these in C++. If you don't buy it, just try them. Looking at the specs will not tell you much if you dismiss D outright.
I'm not doubting they are but i'm not interested in languages with templates that are turing complete. If i where to design a language which is a truely better alternative to C++ in
all aspects D is not what i have in mind.
Why reintroduce another ad-hoc type system & templates? Parametric polymorphism, ad-hoc polymorphism and metaprogramming should all be separate things (but operate together smoothly)
not some intertwined monstrousity that is C++ & D templates. The fact that D got rid of include files and the single-phase processing limitation yet still uses templates for parametric polymorphism i find odd, C++ has no choice but to use templates to implement parametric polymorphism.
You can do better than turing complete templates, a truely better alternative to C++ would be a language which has a formalized type system. It would be a dependently typed language with a formal effects system which also has support for compile & runtime multi-staged programming that should work with the type system seemlessly. This would cover virtually all the things what advance C++ programmers try to actually do in C++.
Quote:Original post by h3r3tic
What's so special about boost::fusion ? A library with functionality similar to boost::python is underway, I've got a lib that accomplishes what boost::bind does. So you say that boost::fusion is the next logical step ? Thanks, I'll make sure D makes it as well.
From what you've just told me you can only write a subset of boost::fusion, also boost::fusion works seemlessly with boost mpl (which is one of the points of the library's existance) and hence the multi-stagged programming i mentioned earlier.
There isn't an equivalent of boost mpl in D (as of yet, as far as i know) and before you (or anyone else) tell me D doesn't need such a library because it has more powerful template system then
you're missing the other points of boost mpl which is not just about getting over limitations of C++ templates so you
must consider that in mind.
Thats not to say D couldn't have such a library but you need somebody with knowledge of a
non-strict purely functional programming language & functional programming techniques aswell as templates to do it. This mostly goes with boost::fusion aswell so are you sure you are ready to do it in D?
If you want to know what boost::fusion is about you can read it for yourself
here.
Quote:Original post by clayasaurus
Cpp requires ~20% more code and twice as many files for the same D equivilent. Most of Cpp's problem is it keeps all its cruft from C to be source compatible. Translate any large C++ project to D to see what I mean.
You've misunderstood completely, what does productivity have to do with syntactical aesthetics really? not much (if at all). Regardless of that C++ and D are both syntactically ugly period, are you trying to say that all languages which are C-derived or C-dialects are more syntactically pleasing than say haskell?
Quote:Original post by clayasaurus
Show me a beatiful Macro then, as all the ones I have seen are ugly.
Did i say they where beautiful? did i not mention it's nothing like having a real macro system? did you even bother to read (carefully) everything i wrote?
If you can not see they're value when it comes to eliminating repetitive boilerplate(meta)code as to what can happen in doing lots of template metaprogramming such as (partial) specializations then i can't help you.
Quote:
They are a language within a language and are very bug prone.
Oh so virtually the entire of boost libraries must be very buggy then. Do you have something against domain specific embedded languages? and i'm not suggesting one would write one with C/C++ preprocessor macros either.
[Edited by - snk_kid on July 1, 2006 7:20:28 AM]