"Concepts" should not be part of function headers
monkyyy
crazymonkyyy at gmail.com
Wed Oct 22 09:10:03 UTC 2025
https://youtu.be/1p6So6vE5WM?si=tEbeBOQ-xXjJawMY
"if its a subset it automagically picks the right one because of
our clever overload rules"
No, No, just No; every overload set with >5 memebers is a big
ball of bugs such as `to`
These are *type assertions*; `isComaparable!(T,U)`=>bool could be
made with a reusable error code by as `template
assertComaparable(T,U,string func=__FUNCTION__)` =>
"max of int and string requires opCmp, consider:
1) .to!string of the first argument
2) .to!int of th 2nd argument
3) implementing int.opCmp(string)
4) implementing string.opCmp(int)
"
More information about the Digitalmars-d-learn
mailing list