Hacker News new | ask | show | jobs
by shaklee3 1780 days ago
Can you link to it? We're using expression templates on a new library and I find it useful.
2 comments

I don't know what code Walter is referring to but I had similar experiences during a presentation of the Boost Spirit library (at our Silicon Valley C++ Meeting; must be about a decade ago now).

The speaker was proud and beaming for showing how powerful C++ is and the audience was in awe.

I was incredulous! Jaw open! The "solution" was horrible with a bunch of workarounds for a bunch of shortcomings. It was a "the emperor does not have cloths" moment for me.

Boost Spirit may be better today with newer C++ features; I don't know.

That's kind of the key. We require c++17. Without that it gets extremely ugly and more verbose.
Oh man, you sure know how to drive a stake in my heart! What have I done! Some curses should just not be uttered. I'm not sure where it is on my backups.

But it was done just like you'd do it in C++. The same thing, just with D syntax.

We're making a numerical computing library that expression templates are used for compile-time evaluation of expressions. It's a very niche hpc library, so it might be one of the few places it's appropriate.
I wish you luck with it. If you send me an email, when I find what I wrote about it I'll pass it along to you.
They probably aren't the only people interested in that...