I've seen these used a lot in the Scala language source code, but I haven't gotten around to trying it until now. I have two public methods that have the same constraint on, and initially was maintaining two copies of the documentation describing the constraint:
This generated Scaladoc that looked like so:
Using Scaladoc's @macro syntax, (described in here somewhere), I can remove the repeated code as follows:
The generated Scaladoc is identical.