[LC++]Return values vs reference parameters
Mark Phillips
mark at austrics.com.au
Tue Jul 31 11:54:10 UTC 2001
Jack Lloyd wrote:
> > There is a huge price of computational inefficiencies in order to get
> > syntactically nice code.
>
> That is the whole price of abstractions, after all.
Sometimes. As I understand it though, the C++ ideal is to
provide better programming abstractions, while still
allowing efficient code. That is why C++ has taken
different design decisions to some other OOP languages.
> > Surely this is not the C++ way? Are there ways and means to get around
> > these problems?
>
> You may want to look at Blitz++.
Thanks for this tip. I've just had a look at this and it
seems very interesting. Unfortunately it seems only
to work when information is obtainable at compile
time. Unfortunately this is not always possible.
I remember in undergraduate computer science, being
told very forcefully that "self-modifying code is bad".
I think this is false. It can be bad, but handled correctly,
it can be very powerful. I believe that the meta-programming
techniques used by Blitz++ could be extended to run-time
data-processing if self-modifying code was allowed. Ie
the efficiency tuning that Blitz++ does at compile time,
could be done at runtime on a code block. The code block
could then be run itself.
Anyway, thanks again for the info.
Cheers,
Mark.
More information about the tuxCPProgramming
mailing list