August 06, 2003 Re: Template question | ||||
---|---|---|---|---|
| ||||
> >
> > Do any of you wizards comprehend how incomprehensible and ugly that looks to us ordinary programmers?
> >
> > The primary goal of the syntax seems to be to allow the existing parser constructs to handle it easily, rather than understandability.
>
> Good point. Whilst being *far* from an expert on D's templates, it seems to me that the current situation is arse 'bout face, and the compiler's ability to make unambiguous decisions, which is a good thing, is more important than (i) usability/readability, and (ii) implicit instantiation. This is fallacious.
>
> However, I have no answer. Most of the people who appear interested in having templates seem to decry the C++ way of doing things. Maybe once bit vs boolean (I'm with you Burton) and the libraries (anyone with me on that one?) issues are resolved, then this is the most important, and probably deserving of most people's attention.
>
> I for one would be very interested to hear in detail (presumably from Walter) the design, functioning and rationale of the current template support, and then get a load of clever template-type people to try and do something non-trivial with the current language.
>
> If we cannot create an equivalent to C++'s STL, in power, efficiency and generality, with D's templates, then they are plainly wrong.
>
> Matthew
>
Aren't templates just a preprocessor on steroids?
Given that they extend the compiler rather than define code, perhaps they should have a syntax that is different than the rest of the language?
Perhaps Walter should do what he did for the preprocessor -- categorize the uses of templates , and provide separate solutions for each?
Templates seem to be a tool that is too powerful to be allowed in the hands of ordinary programmers.
Make D free with templates as a $1200 option? :-)
|
Copyright © 1999-2021 by the D Language Foundation