<div class="gmail_quote">On Tue, Apr 20, 2010 at 11:06, Lars Tandle Kyllingstad <span dir="ltr">&lt;<a href="mailto:lars@kyllingen.net">lars@kyllingen.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Does Complex!BigInt (or Complex!int, for that matter) *ever* make sense?  I mean, yes, it *sounds* cool, and I&#39;m normally against introducing gratuitous constraints on functionality, but in this case I think I prefer restricting T to real number types.<br>

<br>
Have in mind that not only will one have to disable (or introduce special cases for) abs() and arg(), but also some of the operations, in particular division and exponentiation.<br>
<br>
It all sounds like more work, more maintenance, more complex code (hur hur), for very little or no benefit.<br><br></blockquote><div><br>I completly agree, and wasn&#39;t trying to sell Complex for any integral type! My only suggestion was to use a generic template to determine what operators were supported by a type, based on your suggestion to use compile-time interfaces, à la std.range. <br>
I was using BigInt as non-built-in numeric type, the only one available on Phobos.<br><br>But then I thought that the compiler already checks at compile-time that the operations are possible, so I&#39;m not so certain about the need for such a template. Maybe as a way to document the code?<br>
<br>Sorry for the noise, I&#39;ll let you continue your good work.<br><br>Philippe<br></div></div>