D - RE: D's documentation
- Matthias Becker (13/19) Nov 04 2003 Intrinsic functions aren't functions at all, as I understand it. They tr...
- Andy Friesen (4/30) Nov 04 2003 http://ikagames.com/andy/d/console-19-sep-2003.zip
(quote)About Phobos' instrinsic why aren't the math functions instrinsic if possible and are removed in this > part ot Phobos.Intrinsic functions aren't functions at all, as I understand it. They translate directly to assembly instructions. If there's no assembly instruction to do some math operation, then you won't find an intrinsic for it. :) (/quote) Of course, instrinsic functions are converted to asm directly. I ment that the functions from math should if possible on this platform be instrinsic and if not be normal functions. So you would be portable, but could still take adventage of instrinsic functions if possible. (quote)Look at boost::format. It's typesafe, can be used with userdefined types, but uses a printf-like formatstring. OK, you can't do this in D, because of the limited templates, but if templates might be reviewed it might be an interesting option.I've done this in D without templates. It works pretty nicely. (/quote) Could you show me your code?
Nov 04 2003
Matthias Becker wrote:(quote)I hadn't thought of that. Good point.About Phobos' instrinsic why aren't the math functions instrinsic if possible and are removed in this > part ot Phobos.Intrinsic functions aren't functions at all, as I understand it. They translate directly to assembly instructions. If there's no assembly instruction to do some math operation, then you won't find an intrinsic for it. :) (/quote) Of course, instrinsic functions are converted to asm directly. I ment that the functions from math should if possible on this platform be instrinsic and if not be normal functions. So you would be portable, but could still take adventage of instrinsic functions if possible.(quote)http://ikagames.com/andy/d/console-19-sep-2003.zip -- andyLook at boost::format. It's typesafe, can be used with userdefined types, but uses a printf-like formatstring. OK, you can't do this in D, because of the limited templates, but if templates might be reviewed it might be an interesting option.I've done this in D without templates. It works pretty nicely. (/quote) Could you show me your code?
Nov 04 2003