News for hackers. Stuff that matters.
Re: Haskell is our first choice for building production soft... by MaxBarraclough on Monday January 11, 2021 @08:14AM (#25728438)
edit: I see dataflow beat me to it. I'll leave this here anyway.

> I can have an array of T, but I can't specify that T is Numeric?

This is what type-traits and 'concepts' are for, right?

> The compiler knows enough about them to have complex promotion rules but doesn't know enough to allow me to refer to all of them under one name in my code.

This is what std::is_integral gives you.

https://en.cppreference.com/w/cpp/types/is_integral

There are no comments on this comment yet.