David Brown <da...@westcontrol.com> writes:
> If the compiler can generate fractional arithmetic code directly
> from such expressions, then it is indeed a good step towards
> implementing such types as a pure C++ class without needing to use
> compiler extensions.
...
> I am not saying the compiler couldn't generate optimal code (on a
> target with hardware support for these operations) out from
> carefully written generic C++ code - but I do think it would be
> easier to get good code if the compiler views these types as
> "native".

Of course, even if a special compiler representation turns out to be
necessary for optimal performance, that doesn't mean that the _syntax_
has to be something wacky (whereas C has little choice).

It would be perfectly reasonable to have the public interface be a
thin library wrapper around unadvertised builtin types -- and that's
probably quite preferable as it would enable a portable pure library
solution for compilers that do not contain special support.

-Miles

-- 
「寒いね」と話しかければ「寒いね」と答える人のいるあったかさ [俵万智]

Reply via email to