On 11/12/2013 3:06 AM, Don wrote:
On Tuesday, 12 November 2013 at 09:55:20 UTC, Walter Bright wrote:
I forgot to mention that "expression templates" can be used in D in an
equivalent manner that they are used in C++,

They are crippled compared to C++, because you have no control over the return
type of opCmp and opEquals, which means that you can't have expression templates
involving comparisons. That's extremely limiting.

It is limiting, but I don't know about extremely limiting. Eric Anderton's regex engine didn't need them. And, if you really do need them, you can always define the templates as regular names:

   lessThan(a,b)
   equals(a,b)

etc. Not the greatest, but not unworkable.

Reply via email to