On Tuesday, 20 August 2013 at 00:08:31 UTC, Ramon wrote:
Needing a min(), say for strings, ints and floats in a program one shouldn't end up with 3 times code but with code dealing with e.g. "any scalar" or even "anything comparable".

No matter how you cut it, you have to pay for dealing with different types in one function. Either by code-bloat or indirection. The asm for ints, floats, reals etc. are all different and require different code.

See here: http://forum.dlang.org/post/mailman.213.1376962388.1719.digitalmar...@puremagic.com

Reply via email to